Compare commits

...

21 Commits

Author SHA1 Message Date
vbatts 9f5efb4cdd docker*: up and running again ... 2024-05-21 20:42:52 -04:00
vbatts a08e810ed4 data: keep this directory around 2024-05-21 19:15:14 -04:00
Vincent Batts bc2e1f2be3
README: remove the PS1 in the example
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-05-21 19:09:36 -04:00
Vincent Batts 5496b47b21
README: missed a hyphen
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-05-21 19:09:10 -04:00
Vincent Batts f0fea0fe97 Dockerfile: update debian, and install jre from download 2024-05-21 19:07:49 -04:00
Vincent Batts bd27c82805
update README
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-05-21 19:07:36 -04:00
vbatts 8a791f1493 docker*: various updates ? 2024-05-21 18:30:06 -04:00
vbatts 85f2d23e54 final updates as of 2020-01-16 2021-09-04 13:20:28 -04:00
Vincent Batts 9e94766060 final changes for the compose running 2019-03-05 09:21:47 -05:00
Vincent Batts 71c8114e68 add compose file to quickly stand this up 2019-02-28 10:20:50 -05:00
Vincent Batts b95afbf722 update to 6.1.5 2019-02-28 09:29:29 -05:00
Vincent Batts a5b53f38ba changes to not use tomcat, but just standalone 2018-04-04 19:49:08 -04:00
Cyrille Nofficial a60b271193 Upgrade version to 6.1.1 2017-08-20 17:16:56 +02:00
Cyrille Nofficial c76bd69d1e Fix deprecated instruction 2017-08-20 17:16:41 +02:00
Cyrille Nofficial a2c58d4012 Upgrade to 6.0 2016-05-22 10:47:13 +02:00
Cyrille Nofficial 8c46aa8df5 Upgrade to 6.0 2016-02-21 15:37:48 +01:00
Cyrille Nofficial d66dbf5824 Support X-FORWARDED-* headers 2015-10-29 20:16:35 +01:00
Cyrille Nofficial d21e66940e Set context path to "/" 2015-10-29 20:15:57 +01:00
Cyrille Nofficial 429ff0cc41 Use tomcat as servlet engine 2015-10-28 23:30:26 +01:00
Cyrille Nofficial d8ef67a251 Upgrade to 5.3 2015-10-28 20:31:08 +01:00
Cyrille Nofficial 95bd308223 Upgrade to 5.3.beta2 2015-10-11 11:49:49 +02:00
4 changed files with 62 additions and 57 deletions

View File

@ -1,39 +1,42 @@
FROM java:8
MAINTAINER Cyrille Nofficial<cynoffic@cyrilix.fr>
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
ENV SUBSONIC_VERSION 5.2.1
ENV PORT 8080
ENV CONTEXT_PATH /
LABEL version="$SUBSONIC_VERSION"
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"
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
## TODO redo with https://github.com/airsonic-advanced/airsonic-advanced/releases/tag/v10.6.0
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 &&\
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
VOLUME /opt/music/
VOLUME /opt/playlist/
VOLUME /opt/podcast/
EXPOSE $PORT
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
ENV SUBSONIC_HOME /opt/data
ENV SUBSONIC_PORT 4040
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

View File

@ -1,44 +1,28 @@
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 5.2.1 (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 <your-name>/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" \
<your-name>/subsonic
$USER/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

0
data/.gitkeep Normal file
View File

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
version: "3"
services:
subsonic:
#image: vbatts/subsonic
network_mode: "host"
build:
context: .
dockerfile: Dockerfile
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/
- /mnt/audio/Music:/opt/music