2024-04-19 23:47:41 +00:00
|
|
|
FROM python:3.11.8-slim-bookworm
|
2023-07-27 17:30:29 +00:00
|
|
|
ARG INSTALL_DEBUG
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
2023-07-28 07:39:34 +00:00
|
|
|
ENV PATH=/root/.local/bin:$PATH
|
2023-07-27 17:30:29 +00:00
|
|
|
|
|
|
|
# install debug tools for testing environment
|
|
|
|
RUN if [ "$INSTALL_DEBUG" ] ; then \
|
|
|
|
apt-get -y update && apt-get -y install --no-install-recommends \
|
2023-07-28 07:39:34 +00:00
|
|
|
vim htop bmon net-tools iputils-ping procps curl \
|
2024-02-02 16:39:16 +00:00
|
|
|
&& pip install ipython \
|
2023-07-27 17:30:29 +00:00
|
|
|
; fi
|
|
|
|
|
|
|
|
# install requirements
|
|
|
|
COPY ./requirements.txt /requirements.txt
|
2024-02-02 16:39:16 +00:00
|
|
|
RUN pip install -r requirements.txt
|
2023-07-27 17:30:29 +00:00
|
|
|
|
|
|
|
COPY app /app
|
|
|
|
WORKDIR app
|
|
|
|
|
|
|
|
VOLUME /youtube
|
|
|
|
|
|
|
|
CMD ["python", "server.py"]
|