We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9db8449 commit 29207b8Copy full SHA for 29207b8
Dockerfile
@@ -1,17 +1,19 @@
1
-FROM python:slim
+FROM python:slim as base
2
WORKDIR /app
3
ENV PATH=.venv/bin:${PATH}
4
5
-RUN pip install pdm && pip cache purge
+
6
+FROM base AS build
7
+ENV PDM_CHECK_UPDATE=false
8
9
+RUN pip install pdm
10
COPY pyproject.toml pdm.lock ./
-RUN pdm sync -G docker --prod --no-editable && \
- pdm cache clear && \
- \
- pip freeze | xargs pip uninstall -y && \
11
12
- playwright install chromium --with-deps && \
13
- apt clean && \
14
- rm -rf /var/lib/apt/lists/*
+RUN pdm sync --prod --no-editable
+FROM base
15
16
+COPY --from=build /app/.venv/ .venv
17
COPY . .
18
19
CMD nb orm upgrade && nb run
0 commit comments