Add PORT and CONTEXT_PATH env variables

This commit is contained in:
Cyrille Nofficial 2015-05-23 10:11:57 +02:00
parent d3886e0663
commit c98c6793a4
2 changed files with 15 additions and 7 deletions

View File

@ -2,6 +2,8 @@ FROM java:8
MAINTAINER Cyrille Nofficial<cynoffic@cyrilix.fr>
ENV SUBSONIC_VERSION 5.2.1
ENV PORT 8080
ENV CONTEXT_PATH /
LABEL version="$SUBSONIC_VERSION"
LABEL description="Subsonic media streamer"
@ -13,18 +15,16 @@ RUN mkdir -p /opt/subsonic /opt/data /opt/music/ &&\
VOLUME /opt/data
VOLUME /opt/music/
EXPOSE 8080
EXPOSE $PORT
WORKDIR /opt/subsonic
CMD java -Xmx100m \
-Dsubsonic.home=/opt/data \
-Dsubsonic.port=8080 \
-Dsubsonic.contextPath=/ \
-Dsubsonic.port=$PORT \
-Dsubsonic.contextPath=$CONTEXT_PATH \
-Dsubsonic.defaultMusicFolder=/opt/music/ \
-Dsubsonic.defaultPodcastFolder=/opt/music/ \
-Dsubsonic.defaultPlaylistFolder=/opt/music/ \
-Djava.awt.headless=true \
-verbose:gc \
-jar /opt/subsonic/subsonic-booter-jar-with-dependencies.jar

View File

@ -17,11 +17,11 @@ $ docker build -t <your-name>/docker-subsonic .
A current image is available as a trusted build from the Docker index:
```shell
$ docker pull cyrilix/docker-subsonic
$ docker pull cyrilix/subsonic
```
The repository page is at
https://index.docker.io/u/cyrilix/docker-subsonic/
https://index.docker.io/u/cyrilix/subsonic/
## Run a container with this image
@ -34,3 +34,11 @@ $ docker run \
<your-name>/subsonic
```
## 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