We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f98e842 commit 287ed7fCopy full SHA for 287ed7f
Dockerfile
@@ -12,16 +12,21 @@ RUN chown -R gen3:gen3 /${appname}
12
# Builder stage
13
FROM base AS builder
14
15
+USER root
16
+
17
# copy ONLY poetry artifact, install the dependencies but not the app;
18
# this will make sure that the dependencies are cached
19
COPY poetry.lock pyproject.toml /${appname}/
20
RUN poetry install -vv --no-root --only main --no-interaction
21
-COPY --chown=gen3:gen3 . /${appname}
-
22
-# install the app
+COPY . /${appname}
23
RUN poetry install --without dev --no-interaction
24
25
+# ensure the app dir + venv are owned by gen3 for runtime image
26
+RUN chown -R gen3:gen3 /${appname} /venv
27
28
+USER gen3
29
30
# Final stage
31
FROM base
32
0 commit comments