Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Aug 17, 2024
1 parent 6bd69d9 commit b7eb539
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# syntax=docker/dockerfile:labs
FROM python:3.12.5-slim-bookworm AS pip
COPY requirements.txt /tmp/requirements.txt
RUN python3 -m venv /usr/local && \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt upgrade -y && \
apt install -y ca-certificates && \
python3 -m venv /usr/local && \
pip install --no-cache-dir -r /tmp/requirements.txt

FROM python:3.12.5-slim-bookworm
COPY --from=pip /usr/local /usr/local
RUN playwright install chrome
RUN apt update && \
apt upgrade -y && \
apt install -y ca-certificates tzdata tini && \
playwright install chrome
USER nobody
COPY app.py /usr/local/bin/app.py
ENTRYPOINT ["tini", "--", "app.py"]

0 comments on commit b7eb539

Please sign in to comment.