Files
Iris/Dockerfile

78 lines
2.4 KiB
Docker
Raw Normal View History

FROM debian:buster-slim
RUN set -ex \
2019-08-05 07:08:21 +12:00
# Official Mopidy install for Debian/Ubuntu along with some extensions
# (see https://docs.mopidy.com/en/latest/installation/debian/ )
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
2019-08-05 07:08:21 +12:00
curl \
dumb-init \
gcc \
gnupg \
gstreamer1.0-alsa \
gstreamer1.0-plugins-bad \
python-crypto \
python-pykka \
python-tornado \
git \
nano \
&& curl -L https://apt.mopidy.com/mopidy.gpg | apt-key add - \
&& curl -L https://apt.mopidy.com/mopidy.list -o /etc/apt/sources.list.d/mopidy.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
2019-08-05 07:08:21 +12:00
mopidy \
mopidy-soundcloud \
mopidy-spotify \
&& curl -L https://bootstrap.pypa.io/get-pip.py | python - \
&& pip install -U six pyasn1 requests[security] cryptography \
&& pip install \
2019-08-05 07:08:21 +12:00
Mopidy-Local-Images \
Mopidy-Local-SQLite \
2019-08-18 16:14:33 +12:00
Mopidy-Spotify-Web \
2019-08-05 07:08:21 +12:00
Mopidy-GMusic \
Mopidy-Pandora \
pyopenssl \
2019-04-30 19:15:42 +12:00
&& apt-get -f install \
2019-08-05 07:08:21 +12:00
# Clean-up
&& apt-get purge --auto-remove -y \
2019-08-05 07:08:21 +12:00
curl \
gcc \
&& apt-get clean \
2019-08-05 07:08:21 +12:00
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache \
# Clone Iris from the repository and install in development mode.
# This allows a binding at "/iris" to map to your local folder for development, rather than
# installing using pip.
&& git clone https://github.com/jaedb/Iris.git /iris \
2019-08-05 07:08:21 +12:00
&& cd /iris \
&& python setup.py develop \
&& mkdir -p /var/lib/mopidy/.config \
&& ln -s /config /var/lib/mopidy/.config/mopidy \
# Allow mopidy user to run system commands (restart, local scan, etc)
&& echo "mopidy ALL=NOPASSWD: /iris/mopidy_iris/system.sh" >> /etc/sudoers
# Start helper script.
COPY docker/entrypoint.sh /entrypoint.sh
# Default configuration.
COPY docker/mopidy.example.conf /config/mopidy.conf
# Copy the pulse-client configuratrion.
COPY docker/pulse-client.conf /etc/pulse/client.conf
# Allows any user to run mopidy, but runs by default as a randomly generated UID/GID.
ENV HOME=/var/lib/mopidy
RUN set -ex \
&& usermod -G audio,sudo mopidy \
&& chown mopidy:audio -R $HOME /entrypoint.sh /iris \
&& chmod go+rwx -R $HOME /entrypoint.sh /iris
# Runs as mopidy user by default.
USER mopidy:audio
VOLUME ["/var/lib/mopidy/local", "/var/lib/mopidy/local-images", "/iris"]
EXPOSE 6600 6680 1704 1705 5555/udp
ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint.sh"]
CMD ["/usr/bin/mopidy"]