Cleanup and improved README.

This commit is contained in:
Markus Birth 2016-05-26 13:57:14 +02:00
parent 9759153960
commit 2ef7d70796
2 changed files with 40 additions and 14 deletions

@ -10,8 +10,6 @@ RUN apk upgrade -U \
&& apk add ca-certificates ffmpeg lame tzdata \
&& cp /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo "${TZ}" > /etc/timezone \
&& apk del tzdata \
&& rm -rf /var/cache/* \
&& mkdir -p /data/transcode /music/ /playlists/ /podcasts/ \
&& ln -s /usr/bin/lame /data/transcode/lame \
&& ln -s /usr/bin/ffmpeg /data/transcode/ffmpeg \
@ -19,7 +17,11 @@ RUN apk upgrade -U \
&& rm -rf ROOT \
&& wget -q "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 \
&& unzip subsonic.war.zip && rm subsonic.war.zip && mv subsonic.war ROOT.war
&& unzip subsonic.war.zip \
&& rm subsonic.war.zip \
&& mv subsonic.war ROOT.war \
&& apk del tzdata \
&& rm -rf /var/cache/*
ADD server.xml ${CATALINA_HOME}/conf/
ENV JAVA_OPTS="-Xmx${MAX_MEM}m -Dsubsonic.host=0.0.0.0 -Dsubsonic.contextPath=/ -Dsubsonic.home=/data -Dsubsonic.defaultMusicFolder=/music/ -Dsubsonic.defaultPodcastFolder=/podcasts/ -Dsubsonic.defaultPlaylistFolder=/playlists/ -Djava.awt.headless=true"

@ -1,21 +1,44 @@
This repository contains configuration files for building a
Docker (http://docker.io) image for the Subsonic media streamer.
[Docker](https://docker.com/) image for the Subsonic media streamer.
## Noteworthy
* Subsonic 6.0 (http://www.subsonic.org)
* uses jeanblanchard/docker-tomcat with Alpine Linux
* compiled to a 266 MB image instead of 484 MB
[![](https://imagelayers.io/badge/mbirth/subsonic:latest.svg)](https://imagelayers.io/?images=mbirth/subsonic:latest 'Get your own badge on imagelayers.io')
## Build your own image
Noteworthy
----------
* [Subsonic 6.0](http://www.subsonic.org/)
* based on [cyrilix](https://github.com/cyrilix)/[docker-subsonic](https://github.com/cyrilix/docker-subsonic)
* uses [jeanblanchard/tomcat](https://hub.docker.com/r/jeanblanchard/tomcat/) with Alpine Linux
* compiles to a 266 MB image instead of cyrilix's 484 MB
Volumes
-------
* `/subsonic` --- Directory to store Subsonic's log, configuration and database
* `/music` --- Default music folder
* `/podcasts` --- Default podcast folder
* `/playlists` --- Default playlist folder
Environment Variables
---------------------
* `TZ` --- timezone setting, default: `Europe/Berlin`
* `MAX_MEM` --- maximum Java heap size in megabytes, default: `256`
Build your own image
--------------------
```shell
$ docker build -t <your-name>/docker-subsonic .
```
## Get a pre-built image
Get a pre-built image
---------------------
A current image is available as a trusted build from the Docker index:
@ -27,13 +50,14 @@ The repository page is at
https://hub.docker.com/r/mbirth/subsonic/
## Run a container with this image
Run a container with this image
-------------------------------
```shell
$ docker run \
--detach \
--publish 8080:8080 \
--volume "/wherever/your/music/is:/opt/music/:ro" \
--volume "/wherever/your/music/is:/music/:ro" \
<your-name>/subsonic
```