forked from aosfatos/check-up
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (22 loc) · 736 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (22 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# builder
FROM docker.io/python:3.12.3 AS builder
RUN pip install --user pipenv
ENV PIPENV_VENV_IN_PROJECT=1
COPY Pipfile.lock Pipfile /usr/src/
WORKDIR /usr/src
RUN /root/.local/bin/pipenv sync --dev
RUN /usr/src/.venv/bin/python -c "import playwright; print(playwright)"
# runtime
FROM docker.io/python:3.12.3 AS runtime
COPY --from=builder /usr/src/.venv/ /usr/src/.venv/
RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
RUN /usr/src/.venv/bin/python -c "import playwright; print(playwright)"
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /project
ENV PATH=/usr/src/.venv/bin:$PATH
COPY . .
ENV PLAYWRIGHT_BROWSERS_PATH=/project/playwright
RUN playwright install --with-deps firefox
CMD ipython