Dockerfile - split package install/build into separate step
So one it's done, changes to later steps don't need to re-do it. It's slow!
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -63,26 +63,29 @@ RUN \
|
||||
Mopidy-MPD \
|
||||
Mopidy-Spotify-Web \
|
||||
Mopidy-SoundCloud \
|
||||
&& echo "* Creating Mopidy User" \
|
||||
&& echo "* Cleaning up" \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& rm -rf /tmp/*
|
||||
|
||||
# Do this in a separate layer, because building the last is slooow
|
||||
# This allows us to alter these parameters without rebuilding the last.
|
||||
RUN \
|
||||
echo "* Creating Mopidy User" \
|
||||
&& addgroup -g ${pgid} mopidy \
|
||||
&& adduser -h /mopidy -s /bin/sh -D -G mopidy -u $puid mopidy \
|
||||
&& delgroup audio \
|
||||
&& addgroup -g ${audio_gid} audio \
|
||||
&& addgroup mopidy audio \
|
||||
&& echo "mopidy ALL=NOPASSWD: /usr/local/lib/pyenv/versions/*/lib/python*/site-packages/mopidy_iris/system.sh" >> /etc/sudoers \
|
||||
&& echo "* Cleaning up" \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& rm -rf /tmp/* \
|
||||
&& echo "* Ready to start Mopidy" \
|
||||
&& echo "mopidy ALL=NOPASSWD: /usr/lib/python3.8/site-packages/mopidy_iris/system.sh" >> /etc/sudoers \
|
||||
&& echo "* Done" \
|
||||
&& sleep 1
|
||||
|
||||
COPY root/ /
|
||||
RUN chmod +x /usr/local/bin/run.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/run.sh /usr/local/bin/entrypoint.sh
|
||||
EXPOSE 6600 6680 8000
|
||||
VOLUME /data /music
|
||||
|
||||
LABEL description "Open source media server"
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
CMD ["run.sh"]
|
||||
#CMD ["run.sh"]
|
||||
|
||||
Reference in New Issue
Block a user