-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
executable file
·98 lines (72 loc) · 3.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
FROM ubuntu:14.04
MAINTAINER Dave P
# Create rduser (password is rduser)
RUN useradd --create-home --groups sudo,audio rduser ; \
echo "rduser:rduser" | chpasswd ; \
locale-gen en
# Install edcast_jack prereqs
# Download & install libfaac manually (copyright?)
RUN apt-get update ; \
apt-get -y install debconf-utils libjack0 libjack-dev libflac-dev libogg-dev libvorbis-dev libmad0-dev libmp3lame-dev g++ make wget ; \
wget http://launchpadlibrarian.net/157472510/libfaac-dev_1.28-6_amd64.deb ; \
wget http://launchpadlibrarian.net/157472509/libfaac0_1.28-6_amd64.deb ; \
dpkg -i libfaac0_1.28-6_amd64.deb ; \
dpkg -i libfaac-dev_1.28-6_amd64.deb
# Compile & install edcast
COPY edcast-jack-3.1.7.tar.gz /tmp/
RUN tar zxvf /tmp/edcast-jack-3.1.7.tar.gz ; \
cd edcast-jack-3.1.7/ ; ./configure ; \
cd edcast-jack-3.1.7/ ; make ; \
cd edcast-jack-3.1.7/ ; make install
COPY edcast.cfg /home/rduser/edcast.cfg
# Configure icecast
RUN echo "icecast2 icecast2/icecast-setup boolean false" | debconf-set-selections ; \
apt-get -y install icecast2
COPY icecast /etc/default/icecast
COPY icecast.xml /etc/icecast2/icecast.xml
# Install mysql server
RUN echo "mysql-server-5.5 mysql-server/root_password_again password root" | debconf-set-selections ; \
echo "mysql-server-5.5 mysql-server/root_password password root" | debconf-set-selections ; \
apt-get -y install mysql-server mysql-client
# Install tryphon repos
RUN wget -q -O - http://debian.tryphon.eu/release.asc | apt-key add -
COPY tryphon.list /etc/apt/sources.list.d/tryphon.list
# Install Rivendell and other audio goodies
RUN apt-get update ; \
echo "mysql-server-5.5 mysql-server/root_password_again password root" | debconf-set-selections ; \
echo "mysql-server-5.5 mysql-server/root_password password root" | debconf-set-selections ; \
echo "rivendell-server rivendell-server/debconfenable boolean false" | debconf-set-selections ; \
apt-get -y install rivendell rivendell-server rivendell-doc mysql-server jack-rack jamin jackd qjackctl curl
COPY rdmysql.conf /etc/mysql/conf.d/rdmysql.cnf
COPY rd.icecast.conf /etc/rd.icecast.conf
COPY rd.conf /etc/rd.conf
COPY init.sh /home/rduser/init.sh
RUN chmod +x /home/rduser/init.sh
# Install Alsa (is this necessary?)
RUN apt-get -y install alsa-base alsa-utils
# Install VNC Server / X desktop software
RUN apt-get -y install icewm xterm ; \
apt-get -y install tightvncserver ; \
su -c "mkdir /home/rduser/.vnc" rduser ; \
su -c "echo 'rduser' | vncpasswd -f > /home/rduser/.vnc/passwd" rduser ; \
chmod 700 /home/rduser/.vnc ; \
chmod 600 /home/rduser/.vnc/passwd
# Install SSH server
RUN mkdir /var/run/sshd ; \
apt-get -y install openssh-server
# Install supervisor, vnstat, & start script
# Configure vnstat to always use bytes instead of bits to display statistics
RUN apt-get -y install supervisor vnstat ; \
chown -R rduser /var/lib/vnstat ; \
chgrp -R rduser /var/lib/vnstat ; \
sed -i -e"s/^UnitMode\s0/UnitMode 1/" /etc/vnstat.conf ; \
sed -i -e"s/^RateUnit\s1/RateUnit 0/" /etc/vnstat.conf
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start /start
RUN chmod +x /start
# Expose ssh, vnc, icecast
EXPOSE 22
EXPOSE 5900
EXPOSE 8000
# Set boot command
CMD /start