mirror of
https://github.com/luzifer-docker/icecast2.git
synced 2024-12-20 18:41:19 +00:00
Fix for "file exists can't create volume there"
This commit is contained in:
parent
0931219650
commit
6b946e832d
2 changed files with 15 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
@ -1,12 +1,12 @@
|
||||||
From ubuntu:14.04
|
From ubuntu:14.04
|
||||||
MAINTAINER Knut Ahlers <knut@ahlers.me>
|
MAINTAINER Knut Ahlers <knut@ahlers.me>
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update \
|
||||||
apt-get install -y icecast2
|
&& DEBCONF_FRONTEND=noninteractive apt-get install -y icecast2
|
||||||
|
|
||||||
VOLUME /etc/icecast2/icecast.xml
|
VOLUME /config
|
||||||
EXPOSE 8000 8001
|
EXPOSE 8000 8001
|
||||||
|
|
||||||
USER icecast2
|
ADD startup.sh /usr/bin/startup.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/icecast2", "-c", "/etc/icecast2/icecast.xml"]
|
ENTRYPOINT ["/bin/bash", "/usr/bin/startup.sh"]
|
||||||
|
|
10
startup.sh
Normal file
10
startup.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copy default config to /config if not existent
|
||||||
|
if ! [ -e /config/icecast.xml ]; then
|
||||||
|
cp /etc/icecast2/icecast.xml /config/icecast.xml
|
||||||
|
chown icecast2 /config/icecast.xml
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Hand over to icecast
|
||||||
|
sudo -u icecast2 /usr/bin/icecast2 -c /config/icecast.xml
|
Loading…
Reference in a new issue