diff --git a/Dockerfile b/Dockerfile index 1baf0fd..feddc9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,27 @@ -FROM debian:latest AS base-deps -RUN apt-get update -RUN apt-get install -y rclone -RUN apt-get install -y rygel -RUN apt-get install -y fuse +FROM gerbera/gerbera:latest AS base-deps +RUN apk add rclone +RUN apk add gerbera +RUN apk add fuse FROM base-deps -WORKDIR /root # Prepare mount points +WORKDIR /content RUN mkdir audio RUN mkdir radio -# Configuration files copy -RUN mkdir .config && cd .config && mkdir rclone -COPY config/rclone.conf .config/rclone/rclone.conf -COPY config/rygel.conf .config/rygel.conf - # Runtime script copy +WORKDIR /root COPY bin/wrapper.sh wrapper.sh RUN chmod +x wrapper.sh +# Configuration files copy +RUN mkdir .config +WORKDIR /root/.config +RUN mkdir rclone +COPY config/rclone.conf rclone/rclone.conf +RUN mkdir gerbera +COPY config/config.xml gerbera/config.xml + # Runtime processes CMD /root/wrapper.sh diff --git a/bin/wrapper.sh b/bin/wrapper.sh index 738f059..8dc3e3f 100644 --- a/bin/wrapper.sh +++ b/bin/wrapper.sh @@ -1,13 +1,14 @@ -#! /bin/bash +#! /bin/sh -sed -i "s|NC_PASSWORD|$NC_PASSWORD|g" .config/rclone/rclone.conf -sed -i "s|NC_MUSIC_DIR_URL|$NC_MUSIC_DIR_URL|g" .config/rclone/rclone.conf -sed -i "s|NC_MUSIC_DIR_URL|$NC_RADIO_DIR_URL|g" .config/rclone/rclone.conf -sed -i "s|NC_USERNAME|$NC_USERNAME|g" .config/rclone/rclone.conf +sed -i "s|NC_PASSWORD|$NC_PASSWORD|g" /root/.config/rclone/rclone.conf +sed -i "s|NC_MUSIC_DIR_URL|$NC_MUSIC_DIR_URL|g" /root/.config/rclone/rclone.conf +sed -i "s|NC_RADIO_DIR_URL|$NC_RADIO_DIR_URL|g" /root/.config/rclone/rclone.conf +sed -i "s|NC_USERNAME|$NC_USERNAME|g" /root/.config/rclone/rclone.conf -rygel & -rclone mount --read-only --vfs-cache-mode full audio: /root/audio & -rclone mount --read-only --vfs-cache-mode full radio: /root/radio & +rclone mount --read-only --vfs-cache-mode full audio: /content/audio & +rclone mount --read-only --vfs-cache-mode full radio: /content/radio & + +gerbera & wait -n exit $? diff --git a/config/config.xml b/config/config.xml new file mode 100644 index 0000000..7ce302f --- /dev/null +++ b/config/config.xml @@ -0,0 +1,188 @@ + + + + + + + + + + Gerbera + uuid:a314c315-ab50-4b88-8450-faa1b0d5fcd8 + /root + /usr/share/gerbera/web + + 180 + + + gerbera.db + + + localhost + gerbera + gerbera + + + + + upnp:class derivedfrom "object.item" and last_updated > "@last7" + + + upnp:class derivedfrom "object.item" and last_modified > "@last7" + + + + + * + + video + + + + + + + /usr/share/gerbera/js/common.js + /usr/share/gerbera/js/playlists.js + /usr/share/gerbera/js/metadata.js + + /usr/share/gerbera/js/import.js + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + audio/mpeg + no + yes + no + + + + + video/mpeg + yes + yes + yes + + + + + + +