docker-rivendell/Dockerfile

99 lines
3.3 KiB
Docker
Raw Permalink Normal View History

2014-12-13 14:58:37 -08:00
FROM ubuntu:14.04
MAINTAINER Dave P
2014-12-13 18:17:38 -08:00
# Create rduser (password is rduser)
RUN useradd --create-home --groups sudo,audio rduser ; \
echo "rduser:rduser" | chpasswd ; \
locale-gen en
2014-12-13 14:58:37 -08:00
2014-12-13 18:17:38 -08:00
# 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
2014-12-13 14:58:37 -08:00
# Compile & install edcast
COPY edcast-jack-3.1.7.tar.gz /tmp/
2014-12-13 18:17:38 -08:00
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
2014-12-13 18:17:38 -08:00
2014-12-13 14:58:37 -08:00
# Configure icecast
2014-12-13 18:17:38 -08:00
RUN echo "icecast2 icecast2/icecast-setup boolean false" | debconf-set-selections ; \
2014-12-13 14:58:37 -08:00
apt-get -y install icecast2
COPY icecast /etc/default/icecast
2014-12-13 18:17:38 -08:00
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
2014-12-13 14:58:37 -08:00
# 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
2014-12-13 18:17:38 -08:00
# 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
2014-12-14 17:33:32 -08:00
COPY rd.icecast.conf /etc/rd.icecast.conf
2014-12-13 14:58:37 -08:00
COPY rd.conf /etc/rd.conf
COPY init.sh /home/rduser/init.sh
2014-12-13 20:17:58 -08:00
RUN chmod +x /home/rduser/init.sh
2014-12-13 14:58:37 -08:00
2014-12-13 18:17:38 -08:00
# Install Alsa (is this necessary?)
2014-12-13 14:58:37 -08:00
RUN apt-get -y install alsa-base alsa-utils
2014-12-13 18:17:38 -08:00
# 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
2014-12-13 14:58:37 -08:00
# 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
2014-12-13 18:17:38 -08:00
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start /start
RUN chmod +x /start
2014-12-13 14:58:37 -08:00
2014-12-13 18:17:38 -08:00
# Expose ssh, vnc, icecast
EXPOSE 22
EXPOSE 5900
EXPOSE 8000
2014-12-13 14:58:37 -08:00
2014-12-13 18:17:38 -08:00
# Set boot command
CMD /start