-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Dockerfile
35 lines (27 loc) · 1.01 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
FROM python:3.9.18-alpine3.19
RUN apk add --no-cache ffmpeg alpine-sdk python3-dev py3-setuptools tiff-dev jpeg-dev openjpeg-dev zlib-dev freetype-dev lcms2-dev \
libwebp-dev tcl-dev tk-dev harfbuzz-dev fribidi-dev libimagequant-dev \
libxcb-dev libpng-dev
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY patches patches
COPY handlers handlers
COPY langs.json ./
COPY main.py ./
COPY utils.py ./
COPY bot.py ./
# Avoid flac download, conditionally
ARG ENABLE_FLAC="0"
ENV ENABLE_FLAC=$ENABLE_FLAC
RUN echo "> ENABLE_FLAC : $ENABLE_FLAC"
RUN if [ "$ENABLE_FLAC" = "0" ]; then \
echo "FLAC : disabled" && \
mv ./patches/deezer_settings.py /usr/local/lib/python3.9/site-packages/deezloader/deezloader/deezer_settings.py && \
mv ./patches/dee_api.py /usr/local/lib/python3.9/site-packages/deezloader/deezloader/dee_api.py && \
rm -rf ./patches; \
else \
echo "FLAC : enabled" && \
rm -rf ./patches; \
fi
CMD [ "python", "./main.py" ]