FYI use docker openjdk

General discussions.

Moderator: moderators

FYI use docker openjdk

Postby djfarrell » Sat Nov 09, 2019 6:07 am

Peoples, use docker it's good for the soul. Tips though, Docker file exampe:

Code: Select all
FROM openjdk:8

RUN apt-get update && apt-get install -y --no-install-recommends \
  apt-utils xz-utils sudo locales  wget

RUN apt-get install -y procps

EXPOSE 4040
VOLUME /mnt/music
VOLUME /opt/app/state

COPY subsonic-6.1.5.deb /tmp/subsonic.deb
RUN dpkg -i /tmp/subsonic.deb && \
  rm -rf /tmp/subsonic.deb

WORKDIR /opt/app

RUN mkdir -p /opt/app

ADD startup.sh /opt/app/
RUN chmod +x /opt/app/startup.sh

ENTRYPOINT /opt/app/startup.sh


And startup.sh:

Code: Select all
#!/usr/bin/env bash

SUBSONIC_HOME=/opt/app/state JAVA_HOME="/usr/local/openjdk-8/jre" /etc/init.d/subsonic start
sleep infinity


Then start like (notice '--net=host', the location of the state directory and the location of your mesic collection):

Code: Select all
docker run -d --name subsonic --net=host  $(realpath subsonic/data):/opt/app/state -v /backups/dan/Music:/var/music:ro subsonic:0
djfarrell
 
Posts: 4
Joined: Fri Nov 08, 2019 5:18 pm

Re: FYI use docker openjdk

Postby wendigo » Fri May 08, 2020 8:28 pm

How can one use Letsencrypt certificates with this setup?
wendigo
 
Posts: 26
Joined: Sun Dec 11, 2011 11:50 am


Return to General

Who is online

Users browsing this forum: No registered users and 10 guests