-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
72 lines (57 loc) · 1.54 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM python:alpine3.12 as base
ENV MOPIDY_TPL_CONF_FILEPATH=/etc/mopidy/.mopidy.conf
RUN apk add --update --no-cache \
gcc \
gstreamer \
py3-gst \
python3-dev \
cairo \
cairo-dev \
musl-dev \
gobject-introspection \
gobject-introspection-dev \
gstreamer-tools \
gettext
RUN pip install --no-cache-dir --no-use-pep517 PyGObject
RUN pip install --no-cache-dir \
mopidy \
Mopidy-Muse
RUN mkdir -p /var/lib/mopidy/m3u/playlists
RUN apk add --update \
gst-plugins-good \
gst-plugins-ugly \
gst-plugins-bad
COPY entrypoint.sh /entrypoint.sh
COPY mopidy.conf $MOPIDY_TPL_CONF_FILEPATH
# USER
RUN addgroup -g 101 -S mopidy && adduser -u 100 -S mopidy -G mopidy
RUN mkdir /var/cache/mopidy
RUN chown -R mopidy:mopidy /etc/mopidy /var/cache/mopidy /var/lib/mopidy
ENV SNAPSERVER_HOST=localhost
ENV SNAPSERVER_PORT=4953
ENV VOLUME_PERCENTAGE=50
ENV DEFAULT_ROOT_PATH=muse
ENV MEDIA_DIRS=/
EXPOSE 6680 6600
ENTRYPOINT ["/entrypoint.sh"]
CMD ["mopidy", "--config", "/etc/mopidy/mopidy.conf"]
#------------------------
# Mopidy with user
#------------------------
FROM base as mopidy_with_user
USER mopidy
#------------------------
# Mopidy with Muse
#------------------------
FROM base as mopidy_n_muse
RUN pip install --no-cache-dir \
Mopidy-Muse
COPY muse.ext /tmp/muse.ext
RUN cat /tmp/muse.ext >> $MOPIDY_TPL_CONF_FILEPATH
ENV MOPIDY_HOST=localhost
ENV MOPIDY_PORT=1780
ENV MOPIDY_SSL=false
ENV SNAPSCAST_HOST=localhost
ENV SNAPCAST_PORT=1780
ENV SNAPCAST_SSL=false
USER mopidy