RoonServer Dockerfile run.sh

Dockerfile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM photon:latest

LABEL org.opencontainers.image.authors="david@indisko.com"

ENV FFMPEG_PKG=ffmpeg-git-amd64-static.tar.xz

WORKDIR "/root"

RUN tdnf update -y \
&& tdnf -y install sudo bzip2 cifs-utils alsa-utils wget icu xz

RUN curl -O https://johnvansickle.com/ffmpeg/builds/${FFMPEG_PKG}

RUN tar -xf ${FFMPEG_PKG} && rm ${FFMPEG_PKG} \
&& mv ffmpeg-git-* /var/lib/ffmpeg

WORKDIR "/var/lib/ffmpeg"

RUN ln -s "${PWD}/ffmpeg" /usr/local/bin/ \
&& ln -s "${PWD}/ffprobe" /usr/local/bin/

ENV ROON_SERVER_PKG=RoonServer_linuxx64.tar.bz2
ENV ROON_SERVER_URL=ftp://maweiqing:yuanhetang911@106.54.36.205/RoonServer_linuxx64.tar.bz2
ENV ROON_DATAROOT=/data
ENV ROON_ID_DIR=/data

VOLUME [ "/app", "/data", "/music", "/backup" ]

WORKDIR "/root"

ADD run.sh /root

RUN chmod +x /root/run.sh

ENTRYPOINT ["/root/run.sh"]

run.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

# Check folder existence
if test ! -w /app; then
echo "Application folder /app not present or not writable"
exit 1
fi
if test ! -w /data; then
echo "Data folder /data not present or not writable"
exit 1
fi

# Check for shared folders which cause all kinds of weird errors on core updates
rm -f /data/check-for-shared-with-data
touch /app/check-for-shared-with-data
if test -f /data/check-for-shared-with-data; then
echo "Application folder /app and Data folder /data are shared. Please fix this."
exit 1
fi
rm -f /app/check-for-shared-with-data

# Optionally download the app
cd /app
if test ! -d RoonServer; then
if test -z "$ROON_SERVER_URL" -o -z "$ROON_SERVER_PKG"; then
echo "Missing URL ROON_SERVER_URL and/or app name ROON_SERVER_PKG"
exit 1
fi
curl -L $ROON_SERVER_URL -O
tar xjf $ROON_SERVER_PKG
rm -f $ROON_SERVER_PKG
fi

# Run the app
if test -z "$ROON_DATAROOT" -o -z "$ROON_ID_DIR"; then
echo "Dataroot ROON_DATAROOT and/or ID dir ROON_ID_DIR not set"
exit 1
fi
/app/RoonServer/start.sh

docker-compose.yaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
services:
roonserver:
image: davindisko/roon-photon:latest
container_name: roonserver
hostname: roonserver
network_mode: host
# privileged: true
environment:
TZ: "Europe/Paris"
volumes:
- ./app:/app
- ./data:/data
- ./music:/music
- ./backups:/backup
restart: always

Docker for Roon using Photon OS

Docker container for Roon, based on Photon OS linux
Based on the great work of steefdebruijn who did the same based on a debian-slim image.
All informations to troubleshoot your linux server can be found here

Differences

  • ffmpeg is installed manually from official sources
  • Uses local volumes for app, data, music and backups folders

Steps

  • First clone the repo
  • Change TZ param in docker-compose.yaml
  • Uncomment privileged if you encounter problems with network mounts

Run container with docker compose

1
docker-compose up -d

Run container

1
2
3
4
5
6
7
8
docker run -d \
--net=host \
-e TZ="Europe/Paris" \
-v ./app:/app \
-v ./data:/data \
-v ./music:/music \
-v ./backups:/backup \
davindisko/roon-photon:latest