Dockerfile 830 B

123456789101112131415161718192021222324252627
  1. FROM arm32v6/alpine
  2. # GID of group audio on the doccker host
  3. ARG gid_audio=29
  4. RUN apk add --no-cache py-pip mopidy gstreamer gst-plugins-bad sudo python3-dev \
  5. && pip3 install --upgrade pip
  6. RUN python3 -m pip install Mopidy-Iris \
  7. && python3 -m pip install Mopidy-MPD \
  8. && python3 -m pip install Mopidy-Youtube
  9. ADD ./data/mopidy/.config/mopidy/mopidy.conf /var/lib/mopidy/.config/mopidy/mopidy.conf
  10. ADD ./data/etc/asound.conf /etc/asound.conf
  11. # Allow to restart the mopidy service from the web interface
  12. # Change gid to to allow /dev/snd access
  13. RUN chown -R mopidy /var/lib/mopidy \
  14. && echo "mopidy ALL=NOPASSWD: /usr/lib/python?.?/site-packages/mopidy_iris/system.sh" >> /etc/sudoers \
  15. && sed -i /etc/passwd -e "/^mopidy.*/s/18/$gid_audio/"
  16. USER mopidy
  17. EXPOSE 6680/tcp
  18. EXPOSE 6600/tcp
  19. ENTRYPOINT ["/usr/bin/mopidy"]