From a5b53f38ba9d7327d3893bf036c96cc8db6ac1a2 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 4 Apr 2018 19:49:08 -0400 Subject: [PATCH 01/12] changes to not use tomcat, but just standalone --- Dockerfile | 36 ++++++------- server.xml | 149 ----------------------------------------------------- 2 files changed, 18 insertions(+), 167 deletions(-) delete mode 100644 server.xml diff --git a/Dockerfile b/Dockerfile index 362e8e9..db83006 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,28 @@ -FROM tomcat:8-jre8 -LABEL MAINTAINER Cyrille Nofficial - -ENV SUBSONIC_VERSION 6.1.1 - -LABEL version="$SUBSONIC_VERSION" +FROM debian +ENV SUBSONIC_VERSION 6.1.3 LABEL description="Subsonic media streamer" +LABEL version="$SUBSONIC_VERSION" RUN apt-get update &&\ - apt-get -y install libav-tools lame &&\ + apt-get -y dist-upgrade &&\ + apt-get -y install openjdk-8-jre-headless wget libav-tools lame &&\ mkdir -p /opt/data/transcode /opt/music/ /opt/playlist/ /opt/podcast/ &&\ ln -s /usr/bin/lame /opt/data/transcode/lame &&\ ln -s /usr/bin/avconv /opt/data/transcode/ffmpeg &&\ - cd ${CATALINA_HOME}/webapps/ &&\ - rm -rf ROOT &&\ - 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 && mv subsonic.war ROOT.war - -ADD server.xml /usr/local/tomcat/conf/ -ENV JAVA_OPTS="-Dsubsonic.contextPath=/ -Dsubsonic.home=/opt/data -Dsubsonic.defaultMusicFolder=/opt/music/ -Dsubsonic.defaultPodcastFolder=/opt/podcast/ -Dsubsonic.defaultPlaylistFolder=/opt/playlist/" - + wget "https://sourceforge.net/projects/subsonic/files/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-standalone.tar.gz/download" -O subsonic.tar.gz --quiet &&\ + mkdir -p /opt/subsonic &&\ + tar -C /opt/subsonic -xf subsonic.tar.gz &&\ + rm /subsonic.tar.gz +EXPOSE 4040 +EXPOSE 4043 VOLUME /opt/data VOLUME /opt/music/ VOLUME /opt/playlist/ VOLUME /opt/podcast/ - - +ENV SUBSONIC_HOME /opt/data +ENV SUBSONIC_PORT 4040 +ENV SUBSONIC_HTTPS_PORT 4043 +ENV SUBSONIC_DEFAULT_MUSIC_FOLDER /opt/music +ENV SUBSONIC_DEFAULT_PODCAST_FOLDER /opt/podcast +ENV SUBSONIC_DEFAULT_PLAYLIST_FOLDER /opt/playlist +CMD /opt/subsonic/subsonic.sh && tail -f /opt/data/subsonic_sh.log diff --git a/server.xml b/server.xml deleted file mode 100644 index 7dce9e6..0000000 --- a/server.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From b95afbf722eec7c1647aee97a9ae949230077e26 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 28 Feb 2019 09:29:29 -0500 Subject: [PATCH 02/12] update to 6.1.5 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index db83006..7d2e839 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM debian -ENV SUBSONIC_VERSION 6.1.3 +ENV SUBSONIC_VERSION 6.1.5 LABEL description="Subsonic media streamer" LABEL version="$SUBSONIC_VERSION" From 71c8114e685cb31df4ed2d716dfc57c7c6f6a95a Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 28 Feb 2019 10:20:27 -0500 Subject: [PATCH 03/12] add compose file to quickly stand this up --- docker-compose.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6a1becb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3" +services: + subsonic: + #image: vbatts/subsonic + build: + context: . + dockerfile: Dockerfile + ports: + - 0.0.0.0:4040:4040/tcp + - 0.0.0.0:4043:4043/tcp + restart: always + volumes: + - /mnt/data/subsonic:/opt/data/ + - /mnt/data/Videos/:/opt/Videos:ro + - /mnt/data/Audio/:/opt/music:ro + - /mnt/data/storage/syncthing/Music/:/opt/syncthing:ro +#networks: +# host: +# external: true From 9e94766060d34339a2923042d375439c9cca1417 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 5 Mar 2019 09:21:47 -0500 Subject: [PATCH 04/12] final changes for the compose running --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 6a1becb..8f370fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,7 @@ services: - /mnt/data/subsonic:/opt/data/ - /mnt/data/Videos/:/opt/Videos:ro - /mnt/data/Audio/:/opt/music:ro + - /mnt/laura/:/opt/laura:ro - /mnt/data/storage/syncthing/Music/:/opt/syncthing:ro #networks: # host: From 85f2d23e54ef1b9afa4e8050e3daad54e17193c3 Mon Sep 17 00:00:00 2001 From: vbatts Date: Sat, 4 Sep 2021 13:20:28 -0400 Subject: [PATCH 05/12] final updates as of 2020-01-16 --- Dockerfile | 16 ++++++++-------- docker-compose.yml | 14 +++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d2e839..a08061a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ -FROM debian -ENV SUBSONIC_VERSION 6.1.5 +FROM debian:9 +ENV SUBSONIC_VERSION 6.1.6 LABEL description="Subsonic media streamer" LABEL version="$SUBSONIC_VERSION" -RUN apt-get update &&\ - apt-get -y dist-upgrade &&\ - apt-get -y install openjdk-8-jre-headless wget libav-tools lame &&\ - mkdir -p /opt/data/transcode /opt/music/ /opt/playlist/ /opt/podcast/ &&\ - ln -s /usr/bin/lame /opt/data/transcode/lame &&\ - ln -s /usr/bin/avconv /opt/data/transcode/ffmpeg &&\ +RUN apt-get update &&\ + apt-get -y dist-upgrade &&\ + apt-get -y install openjdk-8-jre-headless wget ffmpeg lame &&\ + mkdir -p /opt/data/transcode /opt/music/ /opt/playlist/ /opt/podcast/ &&\ + ln -s /usr/bin/lame /opt/data/transcode/lame &&\ + ln -s /usr/bin/avconv /opt/data/transcode/ffmpeg &&\ wget "https://sourceforge.net/projects/subsonic/files/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-standalone.tar.gz/download" -O subsonic.tar.gz --quiet &&\ mkdir -p /opt/subsonic &&\ tar -C /opt/subsonic -xf subsonic.tar.gz &&\ diff --git a/docker-compose.yml b/docker-compose.yml index 8f370fd..d54b387 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,8 @@ version: "3" services: subsonic: - #image: vbatts/subsonic + image: vbatts/subsonic + network_mode: "host" build: context: . dockerfile: Dockerfile @@ -10,11 +11,6 @@ services: - 0.0.0.0:4043:4043/tcp restart: always volumes: - - /mnt/data/subsonic:/opt/data/ - - /mnt/data/Videos/:/opt/Videos:ro - - /mnt/data/Audio/:/opt/music:ro - - /mnt/laura/:/opt/laura:ro - - /mnt/data/storage/syncthing/Music/:/opt/syncthing:ro -#networks: -# host: -# external: true + - /mnt/data/subsonic:/opt/data/ + - /mnt/video/:/opt/Videos + - /mnt/audio/:/opt/music From 8a791f149399033828b06e2770c3aae2d567a209 Mon Sep 17 00:00:00 2001 From: vbatts Date: Tue, 21 May 2024 18:30:06 -0400 Subject: [PATCH 06/12] docker*: various updates ? --- Dockerfile | 2 ++ docker-compose.yml | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a08061a..ee81629 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,8 @@ ENV SUBSONIC_VERSION 6.1.6 LABEL description="Subsonic media streamer" LABEL version="$SUBSONIC_VERSION" +## TODO redo with https://github.com/airsonic-advanced/airsonic-advanced/releases/tag/v10.6.0 + RUN apt-get update &&\ apt-get -y dist-upgrade &&\ apt-get -y install openjdk-8-jre-headless wget ffmpeg lame &&\ diff --git a/docker-compose.yml b/docker-compose.yml index d54b387..326900a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,5 @@ services: - 0.0.0.0:4043:4043/tcp restart: always volumes: - - /mnt/data/subsonic:/opt/data/ - - /mnt/video/:/opt/Videos - - /mnt/audio/:/opt/music + - ./data:/opt/data/ + - /mnt/audio/Music:/opt/music From bd27c828057f48d8fa27e5682d41deadda87141e Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 21 May 2024 19:07:36 -0400 Subject: [PATCH 07/12] update README Signed-off-by: Vincent Batts --- README.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c5ba1de..9051dab 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,27 @@ -This repository contains configuration files for building a -Docker (http://docker.io) image for the Subsonic media streamer. +This repository contains configuration files for building a [Docker](https://github.com/docker/docker) image for the Subsonic media streamer. ## Noteworthy -* Subsonic 6.0 (http://www.subsonic.org) +* Subsonic (http://www.subsonic.org) +* Still is Java 8 ... (https://www.java.com/download/manual.jsp) ## Build your own image ```shell -$ docker build -t /docker-subsonic . +$ docker build -t $USER/-subsonic . ``` -## Get a pre-built image - -A current image is available as a trusted build from the Docker index: - -```shell -$ docker pull cyrilix/subsonic -``` - -The repository page is at -https://index.docker.io/u/cyrilix/subsonic/ - - ## Run a container with this image ```shell -$ docker run \ - --detach \ - --publish 8080:8080 \ +docker run \ + -it \ + --rm \ + -p 4040:4040 \ + -p 4043:4043 \ --volume "/wherever/your/music/is:/opt/music/:ro" \ - /subsonic + $USER/subsonic ``` From f0fea0fe97322f6fa8fbc8267b8714961a3fab91 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 21 May 2024 19:07:49 -0400 Subject: [PATCH 08/12] Dockerfile: update debian, and install jre from download --- Dockerfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index ee81629..b496fab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,30 @@ -FROM debian:9 +FROM r.batts.cloud/debian:bookworm as extract +COPY jre-8u411-linux-x64.tar.gz / +RUN mkdir -p /usr/java &&\ + tar -C /usr/java -xvf jre-8u411-linux-x64.tar.gz + +FROM r.batts.cloud/debian:bookworm ENV SUBSONIC_VERSION 6.1.6 +ENV JAVA_HOME /usr/java/jre1.8.0_411 +ENV PATH $JAVA_HOME/bin:$PATH LABEL description="Subsonic media streamer" LABEL version="$SUBSONIC_VERSION" ## TODO redo with https://github.com/airsonic-advanced/airsonic-advanced/releases/tag/v10.6.0 -RUN apt-get update &&\ - apt-get -y dist-upgrade &&\ - apt-get -y install openjdk-8-jre-headless wget ffmpeg lame &&\ +RUN apt update &&\ + apt -y dist-upgrade &&\ + apt -y install --no-install-recommends ffmpeg lame &&\ + apt clean -y &&\ + rm -rf /var/lib/apt/lists/* &&\ mkdir -p /opt/data/transcode /opt/music/ /opt/playlist/ /opt/podcast/ &&\ ln -s /usr/bin/lame /opt/data/transcode/lame &&\ ln -s /usr/bin/avconv /opt/data/transcode/ffmpeg &&\ - wget "https://sourceforge.net/projects/subsonic/files/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-standalone.tar.gz/download" -O subsonic.tar.gz --quiet &&\ + curl -o subsonic.tar.gz -SL "https://sourceforge.net/projects/subsonic/files/subsonic/$SUBSONIC_VERSION/subsonic-$SUBSONIC_VERSION-standalone.tar.gz/download" &&\ mkdir -p /opt/subsonic &&\ tar -C /opt/subsonic -xf subsonic.tar.gz &&\ rm /subsonic.tar.gz +COPY --from=extract /usr/java/jre1.8.0_411 /usr/java/jre1.8.0_411 EXPOSE 4040 EXPOSE 4043 VOLUME /opt/data From 5496b47b2196690ace266b1f1a183be7d5529226 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 21 May 2024 19:09:10 -0400 Subject: [PATCH 09/12] README: missed a hyphen Signed-off-by: Vincent Batts --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9051dab..6304167 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This repository contains configuration files for building a [Docker](https://git ## Build your own image ```shell -$ docker build -t $USER/-subsonic . +$ docker build -t $USER/subsonic . ``` ## Run a container with this image From bc2e1f2be31dc47ef345b1b1de26276c423fe2bf Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 21 May 2024 19:09:36 -0400 Subject: [PATCH 10/12] README: remove the PS1 in the example Signed-off-by: Vincent Batts --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6304167..232fba7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This repository contains configuration files for building a [Docker](https://git ## Build your own image ```shell -$ docker build -t $USER/subsonic . +docker build -t $USER/subsonic . ``` ## Run a container with this image From a08e810ed41e93cf0426fb16bc17f9050d5cbe7a Mon Sep 17 00:00:00 2001 From: vbatts Date: Tue, 21 May 2024 19:15:14 -0400 Subject: [PATCH 11/12] data: keep this directory around --- data/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 data/.gitkeep diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 From 9f5efb4cdd3e86dd8571cb65876afbf3e31d381a Mon Sep 17 00:00:00 2001 From: vbatts Date: Tue, 21 May 2024 20:42:52 -0400 Subject: [PATCH 12/12] docker*: up and running again ... --- Dockerfile | 4 +++- docker-compose.yml | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b496fab..383e5ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,8 +33,10 @@ VOLUME /opt/playlist/ VOLUME /opt/podcast/ ENV SUBSONIC_HOME /opt/data ENV SUBSONIC_PORT 4040 -ENV SUBSONIC_HTTPS_PORT 4043 +ENV SUBSONIC_HTTPS_PORT 0 +ENV SUBSONIC_MAX_MEMORY 250 ENV SUBSONIC_DEFAULT_MUSIC_FOLDER /opt/music ENV SUBSONIC_DEFAULT_PODCAST_FOLDER /opt/podcast ENV SUBSONIC_DEFAULT_PLAYLIST_FOLDER /opt/playlist +ENV HOME /opt/data CMD /opt/subsonic/subsonic.sh && tail -f /opt/data/subsonic_sh.log diff --git a/docker-compose.yml b/docker-compose.yml index 326900a..a2ef5d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,17 @@ version: "3" services: subsonic: - image: vbatts/subsonic + #image: vbatts/subsonic network_mode: "host" build: context: . dockerfile: Dockerfile - ports: - - 0.0.0.0:4040:4040/tcp - - 0.0.0.0:4043:4043/tcp + read_only: true + tmpfs: + - /tmp + #ports: + #- 0.0.0.0:4040:4040/tcp + #- 0.0.0.0:4043:4043/tcp restart: always volumes: - ./data:/opt/data/