This commit is contained in:
Brandon
2019-08-18 05:15:15 -05:00
parent 2922455332
commit 32374c9cee
2 changed files with 2 additions and 9 deletions

View File

@@ -36,12 +36,6 @@ RUN \
Mopidy-Local-SQLite \ Mopidy-Local-SQLite \
&& echo "* Installing Iris" \ && echo "* Installing Iris" \
&& pip install -U Mopidy-Iris \ && pip install -U Mopidy-Iris \
&& echo "* Creating Mopidy User" \
&& addgroup -g ${PGID} mopidy \
&& adduser -h /mopidy -s /bin/sh -D -G mopidy -u ${PUID} mopidy \
&& echo "* Fixing privileges" \
&& mkdir -p /data \
&& chown -R mopidy:mopidy /data \
&& echo "* Ready to start Mopidy" \ && echo "* Ready to start Mopidy" \
&& sleep 10 && sleep 10
@@ -49,9 +43,8 @@ COPY mopidy.conf /config/mopidy.conf
COPY run.sh /usr/local/bin/run.sh COPY run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh RUN chmod +x /usr/local/bin/run.sh
EXPOSE 6600 6680 5555/udp EXPOSE 6600 6680 5555/udp
USER mopidy
VOLUME ["/music", "/data"] VOLUME ["/music", "/data"]
LABEL description "Open source media server" LABEL description "Open source media server"
CMD ["/sbin/tini", "--", "run.sh"] CMD ["/sbin/tini", "--", "mopidy --config '/data/config/mopidy.conf'"]

2
run.sh
View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
function stop() { function stop() {
kill $PID kill $PID
} }
trap stop HUP INT TERM trap stop HUP INT TERM