yt-dlp-bot/api/Dockerfile

26 lines
790 B
Text
Raw Normal View History

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