Prerequisites:
opkg install docker dockerd docker-compose luci-app-dockerman
Run:
docker-compose up
-> The image does build but it gets weirdly slow while doing so, also lucy starts to become unresponsive during build and ultimately fails with the following error:
ERROR: for lms_container Cannot start service lms: driver failed programming external connectivity on endpoint lms_container (562ff147f9e40cf9ef03a4cff5d92d612b3539267aaa91d1153a11b08a7c2e2e): exec: "docker-proxy": executable file not found in $PATH
docker-compose.yml
version: "3.7"
services:
lms:
build:
network: host
context: .
volumes:
- /etc/localtime:/etc/localtime:ro
- /overlay/upper/root/lms/squezebox:/srv/squeezebox
- /overlay/upper/root/lms/music:/srv/music
ports:
## uncomment the following line if you want to be able to
## access the web ui on port 80.
# - "80:9000"
- "9000:9000"
- "9090:9090"
- "3483:3483"
- "3483:3483/udp"
restart: always
image: lms
container_name: lms_container
# init: true
volumes:
squeezebox:
Dockerfile
FROM arm64v8/ubuntu
MAINTAINER swanson
ENV SQUEEZE_VOL /srv/squeezebox
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV PACKAGE_VERSION_URL=http://www.mysqueezebox.com/update/?version=8.2&revision=1&geturl=1&os=debarm
RUN apt-get update && \
apt-get -y install curl wget faad flac lame sox libio-socket-ssl-perl tzdata && \
apt-get clean
RUN printf "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d
RUN url=$(curl "$PACKAGE_VERSION_URL") && \
curl -Lsf -o /tmp/logitechmediaserver.deb $url && \
apt-get update && dpkg -i /tmp/logitechmediaserver.deb && \
rm -f /tmp/logitechmediaserver.deb && \
apt-get clean
# This will be created by the entrypoint script.
RUN userdel squeezeboxserver
VOLUME $SQUEEZE_VOL
EXPOSE 3483 3483/udp 9000 9090
COPY entrypoint.sh /entrypoint.sh
COPY start-squeezebox.sh /start-squeezebox.sh
RUN chmod 755 /entrypoint.sh /start-squeezebox.sh
ENTRYPOINT ["/entrypoint.sh"]
entrypoint.sh
#!/bin/sh
: "${SQUEEZE_UID:=1000}"
: "${SQUEEZE_GID:=1000}"
groupadd -g $SQUEEZE_GID squeezeboxserver
useradd -u $SQUEEZE_UID -g $SQUEEZE_GID \
-d /usr/share/squeezeboxserver/ \
-c 'Logitech Media Server' \
squeezeboxserver
if [ "$SQUEEZE_VOL" ] && [ -d "$SQUEEZE_VOL" ]; then
for subdir in prefs logs cache; do
mkdir -p "$SQUEEZE_VOL"/$subdir
done
fi
chown -R squeezeboxserver:squeezeboxserver "$SQUEEZE_VOL"
exec runuser -u squeezeboxserver -- /start-squeezebox.sh "$@"
start-squezebox.sh
#!/bin/sh
myip=$( ip addr show eth0 2> /dev/null | awk '$1 == "inet" {print $2}' | cut -f1 -d/ )
if [ "$myip" ]; then
url="http://$myip:9000/"
echo ======================================================================
echo "$url"
echo ======================================================================
echo
fi
exec squeezeboxserver \
--prefsdir $SQUEEZE_VOL/prefs \
--logdir $SQUEEZE_VOL/logs \
--cachedir $SQUEEZE_VOL/cache "$@"
lsblk
PS: For the container to get internet access I had to set network: host
in docker-compose.yml, it doesnt seem like the intended approach here, or is it?