DRF_Template/Dockerfile

25 lines
802 B
Text
Raw Permalink Normal View History

2024-10-31 00:34:43 +08:00
FROM python:3.13.0-bullseye
2024-01-06 12:13:39 +08:00
2024-09-05 13:29:14 +08:00
ENV PYTHONBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
2024-01-06 12:13:39 +08:00
WORKDIR /code
COPY . /code/
ADD . /code/
2024-10-31 00:34:43 +08:00
COPY scripts/ /code/scripts/
RUN chmod +x /code/scripts/start.sh
2024-09-05 13:32:29 +08:00
# Install packages
2024-10-17 19:12:17 +08:00
RUN apt update && apt install -y graphviz libgraphviz-dev graphviz-dev wget zip chromium chromium-driver firefox-esr
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r requirements.txt
2024-10-17 19:12:17 +08:00
# (Firefox) Download the latest Geckodriver and install it
ENV GECKODRIVER_VERSION=latest
2024-08-30 17:37:49 +08:00
RUN wget -O geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz
RUN tar -zxf geckodriver.tar.gz -C /usr/bin
RUN chmod +x /usr/bin/geckodriver
2024-01-06 12:13:39 +08:00
# Expose port 8000 for the web server
EXPOSE 8000
2024-10-31 00:34:43 +08:00
ENTRYPOINT [ "/code/scripts/start.sh" ]