forked from tangyoha/telegram_media_downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (19 loc) · 984 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
27
28
29
30
31
FROM python:3.11.2-alpine As compile-image
WORKDIR /app
COPY requirements.txt /app/
RUN apk add --no-cache --virtual .build-deps gcc g++ cmake make musl-dev \
openblas-dev 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 \
&& pip install --trusted-host pypi.python.org -r requirements.txt \
&& apk del .build-deps && rm -rf requirements.txt
RUN apk add --no-cache rclone
FROM python:3.11.2-alpine As runtime-image
WORKDIR /app
COPY --from=tangyoha/telegram_media_downloader_compile /usr/bin/rclone /app/rclone/rclone
COPY --from=tangyoha/telegram_media_downloader_compile /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
RUN apk add --no-cache openblas-dev ffmpeg
COPY config.yaml data.yaml setup.py media_downloader.py /app/
COPY module /app/module
COPY utils /app/utils
CMD ["python", "media_downloader.py"]