Run with subsonic user
This commit is contained in:
parent
40ee31c784
commit
3443965223
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,8 @@ LABEL description="Subsonic media streamer"
|
||||||
|
|
||||||
RUN apt-get update &&\
|
RUN apt-get update &&\
|
||||||
apt-get -y install ffmpeg lame &&\
|
apt-get -y install ffmpeg lame &&\
|
||||||
mkdir -p /opt/subsonic /opt/data/transcode /opt/music/ &&\
|
adduser --system --home /opt/subsonic subsonic &&\
|
||||||
|
mkdir -p /opt/data/transcode /opt/music/ &&\
|
||||||
ln -s /usr/bin/lame /opt/data/transcode/ &&\
|
ln -s /usr/bin/lame /opt/data/transcode/ &&\
|
||||||
ln -s /usr/bin/ffmpeg /opt/data/transcode/ &&\
|
ln -s /usr/bin/ffmpeg /opt/data/transcode/ &&\
|
||||||
wget "http://downloads.sourceforge.net/project/subsonic/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-standalone.tar.gz?r=http%3A%2F%2Fwww.subsonic.org%2Fpages%2Fdownload2.jsp%3Ftarget%3Dsubsonic-$SUBSONIC_VERSION-standalone.tar.gz&ts=1431096340&use_mirror=garr" \
|
wget "http://downloads.sourceforge.net/project/subsonic/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-standalone.tar.gz?r=http%3A%2F%2Fwww.subsonic.org%2Fpages%2Fdownload2.jsp%3Ftarget%3Dsubsonic-$SUBSONIC_VERSION-standalone.tar.gz&ts=1431096340&use_mirror=garr" \
|
||||||
|
@ -22,6 +23,7 @@ VOLUME /opt/music/
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
WORKDIR /opt/subsonic
|
WORKDIR /opt/subsonic
|
||||||
|
|
||||||
|
USER subsonic
|
||||||
CMD java -Xmx100m \
|
CMD java -Xmx100m \
|
||||||
-Dsubsonic.home=/opt/data \
|
-Dsubsonic.home=/opt/data \
|
||||||
-Dsubsonic.port=$PORT \
|
-Dsubsonic.port=$PORT \
|
||||||
|
|
Loading…
Reference in a new issue