-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (41 loc) · 1.66 KB
/
Dockerfile
File metadata and controls
48 lines (41 loc) · 1.66 KB
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
FROM python:3.13-alpine AS base
WORKDIR /usr/local/src/mopidy
# Install Mopidy requirements
RUN --mount=type=bind,source=requirements.txt,target=requirements.txt \
apk add --no-cache --virtual build-dependencies python3-dev gcc libc-dev \
cairo-dev gobject-introspection gobject-introspection-dev \
&& apk add --no-cache \
git \
gstreamer \
py3-gobject3 \
py3-gst \
su-exec \
gst-plugins-bad \
gst-plugins-good \
gst-plugins-ugly \
&& python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir --requirement requirements.txt \
&& apk del build-dependencies \
;
COPY docker-entrypoint.sh .
ENTRYPOINT [ "/usr/local/src/mopidy/docker-entrypoint.sh" ]
CMD [ "/usr/local/bin/mopidy", "--config", "/mopidy/config" ]
FROM base AS youtube
RUN apk add --no-cache --virtual build-dependencies python3-dev gcc libc-dev \
cairo-dev gobject-introspection gobject-introspection-dev \
&& apk add --no-cache deno \
&& python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir "setuptools<71" \
&& python3 -m pip install --no-cache-dir \
Mopidy-MPD \
Mopidy-YouTube \
ytmusicapi \
pytube \
"yt-dlp[default]" \
&& if [ "$(python3 -c 'import mopidy_youtube; print(mopidy_youtube.__version__)')" = "4.0" ]; then \
# mopidy-youtube 4.0 uses deprecated Pydantic v2 arg `by_aliases`.
sed -i 's/by_aliases=True/by_alias=True/g' /usr/local/lib/python3.13/site-packages/mopidy_youtube/youtube.py; \
fi \
&& apk del build-dependencies \
;
FROM base AS core