yt-dlp-bot/api/Dockerfile

31 lines
716 B
Text
Raw Normal View History

2022-10-14 03:55:18 +08:00
FROM python:3.10-alpine
2022-02-04 06:21:27 +08:00
2022-10-14 03:55:18 +08:00
RUN apk add --no-cache \
tzdata \
htop \
bash \
netcat-openbsd
2022-02-04 06:21:27 +08:00
2022-06-11 04:35:48 +08:00
COPY ./api/requirements.txt ./yt_shared/requirements_shared.txt /app/
2022-02-04 06:21:27 +08:00
WORKDIR /app
2022-10-14 03:55:18 +08:00
RUN apk add --no-cache --virtual .build-deps \
linux-headers \
libffi-dev \
zlib-dev \
build-base \
2022-02-04 06:21:27 +08:00
&& pip install --upgrade pip setuptools wheel \
2022-10-14 03:55:18 +08:00
&& MAKEFLAGS="-j$(nproc)" \
2022-06-11 04:35:48 +08:00
&& pip install --no-cache-dir -r requirements.txt -r requirements_shared.txt \
2022-10-14 03:55:18 +08:00
&& rm requirements_shared.txt \
&& apk --purge del .build-deps
2022-02-04 06:21:27 +08:00
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