-
Notifications
You must be signed in to change notification settings - Fork 91
/
Dockerfile
26 lines (21 loc) · 943 Bytes
/
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
FROM python:3.12-alpine3.20 AS builder
RUN pip install poetry
COPY . /app
WORKDIR /app
RUN poetry build --format=wheel
FROM python:3.12-alpine3.20
ENV PYTHONUNBUFFERED=TRUE
RUN apk add --no-cache ffmpeg && \
adduser -D deezer && \
mkdir -p /mnt/deezer-downloader && \
chown deezer:deezer /mnt/deezer-downloader
COPY --from=builder /app/dist/deezer_downloader*.whl .
RUN pip install deezer_downloader*.whl && \
/usr/local/bin/deezer-downloader --show-config-template > /etc/deezer-downloader.ini && \
sed -i "s,.*command = /usr/bin/yt-dlp.*,command = $(which yt-dlp)," /etc/deezer-downloader.ini && \
sed -i 's,host = 127.0.0.1,host = 0.0.0.0,' /etc/deezer-downloader.ini && \
sed -i 's,/tmp/deezer-downloader,/mnt/deezer-downloader,' /etc/deezer-downloader.ini && \
rm deezer_downloader*.whl
USER deezer
EXPOSE 5000
ENTRYPOINT ["/usr/local/bin/deezer-downloader", "--config", "/etc/deezer-downloader.ini"]