From 429ff0cc41221ffa255e4a8680e7cfb152afd2a6 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Wed, 28 Oct 2015 23:30:26 +0100 Subject: [PATCH] Use tomcat as servlet engine --- Dockerfile | 28 ++++++++-------------------- README.md | 8 +------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index 812aab9..24ee84a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,39 +1,27 @@ -FROM java:8 +FROM tomcat:8-jre8 MAINTAINER Cyrille Nofficial ENV SUBSONIC_VERSION 5.3 -ENV PORT 8080 -ENV CONTEXT_PATH / LABEL version="$SUBSONIC_VERSION" LABEL description="Subsonic media streamer" RUN apt-get update &&\ apt-get -y install libav-tools lame &&\ - adduser --system --home /opt/subsonic subsonic &&\ mkdir -p /opt/data/transcode /opt/music/ /opt/playlist/ /opt/podcast/ &&\ - chown -R subsonic /opt/data /opt/playlist/ /opt/podcast/ &&\ ln -s /usr/bin/lame /opt/data/transcode/lame &&\ ln -s /usr/bin/avconv /opt/data/transcode/ffmpeg &&\ - 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 + cd ${CATALINA_HOME}/webapps/ &&\ + wget "http://downloads.sourceforge.net/project/subsonic/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-war.zip?r=http%3A%2F%2Fwww.subsonic.org%2Fpages%2Fdownload2.jsp%3Ftarget%3Dsubsonic-$SUBSONIC_VERSION-standalone.tar.gz&ts=1431096340&use_mirror=garr" \ + -O subsonic.war.zip --quiet &&\ + unzip subsonic.war.zip && rm subsonic.war.zip + +ENV JAVA_OPTS="-Dsubsonic.home=/opt/data -Dsubsonic.defaultMusicFolder=/opt/music/ -Dsubsonic.defaultPodcastFolder=/opt/podcast/ -Dsubsonic.defaultPlaylistFolder=/opt/playlist/" VOLUME /opt/data VOLUME /opt/music/ VOLUME /opt/playlist/ VOLUME /opt/podcast/ -EXPOSE $PORT +EXPOSE 8080 WORKDIR /opt/subsonic - -USER subsonic -CMD java -Xmx100m \ - -Dsubsonic.home=/opt/data \ - -Dsubsonic.port=$PORT \ - -Dsubsonic.contextPath=$CONTEXT_PATH \ - -Dsubsonic.defaultMusicFolder=/opt/music/ \ - -Dsubsonic.defaultPodcastFolder=/opt/podcast/ \ - -Dsubsonic.defaultPlaylistFolder=/opt/playlist/ \ - -Djava.awt.headless=true \ - -verbose:gc \ - -jar /opt/subsonic/subsonic-booter-jar-with-dependencies.jar diff --git a/README.md b/README.md index c60ef60..3a22c04 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Docker (http://docker.io) image for the Subsonic media streamer. ## Noteworthy -* Subsonic 5.3.beta2 (http://www.subsonic.org) +* Subsonic 5.3 (http://www.subsonic.org) ## Build your own image @@ -35,10 +35,4 @@ $ docker run \ ``` -## Configuration - -Specify env variables: - - * CONTEXT_PATH = The context path, i.e., the last part of the Subsonic URL. Typically '/' or '/subsonic'. Default '/' - * PORT = The port on which Subsonic will listen for incoming HTTP traffic. Default: 8080