2015-05-14 16:10:49 +00:00
|
|
|
FROM java:8
|
|
|
|
MAINTAINER Cyrille Nofficial<cynoffic@cyrilix.fr>
|
|
|
|
|
|
|
|
ENV SUBSONIC_VERSION 5.2.1
|
2015-05-23 08:11:57 +00:00
|
|
|
ENV PORT 8080
|
|
|
|
ENV CONTEXT_PATH /
|
2015-05-14 16:10:49 +00:00
|
|
|
|
2015-05-14 21:37:21 +00:00
|
|
|
LABEL version="$SUBSONIC_VERSION"
|
|
|
|
LABEL description="Subsonic media streamer"
|
|
|
|
|
2015-05-24 17:53:14 +00:00
|
|
|
RUN apt-get update &&\
|
2015-05-30 09:08:22 +00:00
|
|
|
apt-get -y install libav-tools lame &&\
|
2015-05-24 18:38:09 +00:00
|
|
|
adduser --system --home /opt/subsonic subsonic &&\
|
2015-05-30 12:09:43 +00:00
|
|
|
mkdir -p /opt/data/transcode /opt/music/ /opt/playlist/ /opt/podcast/ &&\
|
|
|
|
chown -R subsonic /opt/data /opt/playlist/ /opt/podcast/ &&\
|
2015-05-30 09:08:22 +00:00
|
|
|
ln -s /usr/bin/lame /opt/data/transcode/lame &&\
|
|
|
|
ln -s /usr/bin/avconv /opt/data/transcode/ffmpeg &&\
|
2015-05-14 16:10:49 +00:00
|
|
|
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" \
|
|
|
|
-O- --quiet | tar zxv -C /opt/subsonic
|
|
|
|
|
|
|
|
VOLUME /opt/data
|
|
|
|
VOLUME /opt/music/
|
2015-05-30 12:09:43 +00:00
|
|
|
VOLUME /opt/playlist/
|
|
|
|
VOLUME /opt/podcast/
|
2015-05-14 16:10:49 +00:00
|
|
|
|
2015-05-23 08:11:57 +00:00
|
|
|
EXPOSE $PORT
|
2015-05-14 16:10:49 +00:00
|
|
|
WORKDIR /opt/subsonic
|
|
|
|
|
2015-05-24 18:38:09 +00:00
|
|
|
USER subsonic
|
2015-05-14 16:10:49 +00:00
|
|
|
CMD java -Xmx100m \
|
|
|
|
-Dsubsonic.home=/opt/data \
|
2015-05-23 08:11:57 +00:00
|
|
|
-Dsubsonic.port=$PORT \
|
|
|
|
-Dsubsonic.contextPath=$CONTEXT_PATH \
|
2015-05-14 16:10:49 +00:00
|
|
|
-Dsubsonic.defaultMusicFolder=/opt/music/ \
|
2015-05-30 12:09:43 +00:00
|
|
|
-Dsubsonic.defaultPodcastFolder=/opt/podcast/ \
|
|
|
|
-Dsubsonic.defaultPlaylistFolder=/opt/playlist/ \
|
2015-05-14 16:10:49 +00:00
|
|
|
-Djava.awt.headless=true \
|
|
|
|
-verbose:gc \
|
|
|
|
-jar /opt/subsonic/subsonic-booter-jar-with-dependencies.jar
|