yt-dlp-bot/api/Dockerfile

27 lines
874 B
Text
Raw Normal View History

2022-06-11 04:35:48 +08:00
FROM python:3.10-slim-buster
2022-02-04 06:21:27 +08:00
RUN apt update \
&& apt install --yes --no-install-recommends \
bash htop net-tools iputils-ping procps netcat \
&& rm -rf /var/lib/apt/lists/*
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
RUN apt update \
&& apt install --yes gcc g++ libffi-dev libjpeg-dev zlib1g-dev python3-dev build-essential libtool automake \
&& pip install --upgrade pip setuptools wheel \
2022-06-11 04:35:48 +08:00
&& pip install --no-cache-dir -r requirements.txt -r requirements_shared.txt \
2022-02-04 06:21:27 +08:00
&& apt-get autoremove --yes gcc g++ libffi-dev libjpeg-dev zlib1g-dev python3-dev build-essential libtool automake \
2022-06-11 04:35:48 +08:00
&& rm -rf /var/lib/apt/lists/* \
&& rm requirements_shared.txt
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