-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
54 lines (44 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM debian:12-slim
LABEL Author="Rogger Fabri"
ARG ARCH=amd64
ARG GST_PLUGIN_SPOTIFY_VERSION=0.13.1-1
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_NO_CACHE_DIR=1
RUN apt update && apt upgrade -y \
&& apt install -y \
curl \
dumb-init \
mopidy \
python3-pip \
sudo \
&& mkdir -p ~/.config/pip && printf "[global]\nbreak-system-packages = true\n" | tee ~/.config/pip/pip.conf \
&& pip install \
Mopidy-Iris \
Mopidy-Local \
Mopidy-Mobile \
Mopidy-MPD \
Mopidy-Scrobbler \
Mopidy-Spotify==5.0.0a2 \
Mopidy-TuneIn \
&& apt purge --auto-remove -y \
gcc \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache /root/.cache
RUN curl -L -o gst-plugin-spotify_${GST_PLUGIN_SPOTIFY_VERSION}_${ARCH}.deb https://github.com/kingosticks/gst-plugins-rs-build/releases/download/gst-plugin-spotify_${GST_PLUGIN_SPOTIFY_VERSION}/gst-plugin-spotify_${GST_PLUGIN_SPOTIFY_VERSION}_${ARCH}.deb \
&& dpkg -i gst-plugin-spotify_${GST_PLUGIN_SPOTIFY_VERSION}_${ARCH}.deb \
; apt update && apt -f install -y \
&& rm gst-plugin-spotify_${GST_PLUGIN_SPOTIFY_VERSION}_${ARCH}.deb \
&& curl -L -o libshout3_2.4.1-2_${ARCH}.deb http://ftp.de.debian.org/debian/pool/main/libs/libshout/libshout3_2.4.1-2_${ARCH}.deb \
&& dpkg -i libshout3_2.4.1-2_${ARCH}.deb \
; apt update && apt -f install -y \
&& rm libshout3_2.4.1-2_${ARCH}.deb
RUN sh -c 'echo "mopidy ALL=NOPASSWD: /usr/local/lib/python3.11/dist-packages/mopidy_iris/system.sh" >> /etc/sudoers'
USER mopidy
EXPOSE 6600
EXPOSE 6680
EXPOSE 5555/udp
ADD ./start.sh /start.sh
ENTRYPOINT ["dumb-init", "--"]
CMD ["/start.sh"]
HEALTHCHECK --interval=60s --timeout=5s --retries=3 \
CMD curl --connect-timeout 5 --silent --show-error --fail http://localhost:6680/ || exit 1