yt-dlp-bot/api/Dockerfile
Taras Terletskyi b7d1854528 Refinements
2022-10-13 22:55:18 +03:00

30 lines
716 B
Docker

FROM python:3.10-alpine
RUN apk add --no-cache \
tzdata \
htop \
bash \
netcat-openbsd
COPY ./api/requirements.txt ./yt_shared/requirements_shared.txt /app/
WORKDIR /app
RUN apk add --no-cache --virtual .build-deps \
linux-headers \
libffi-dev \
zlib-dev \
build-base \
&& pip install --upgrade pip setuptools wheel \
&& MAKEFLAGS="-j$(nproc)" \
&& pip install --no-cache-dir -r requirements.txt -r requirements_shared.txt \
&& rm requirements_shared.txt \
&& apk --purge del .build-deps
COPY ./api /app
COPY ./start.sh /app/start.sh
RUN chmod +x /app/start.sh
COPY yt_shared /app/yt_shared
RUN pip install -e /app/yt_shared