Commit 583a6c2 1 parent 5950da4 commit 583a6c2 Copy full SHA for 583a6c2
File tree 3 files changed +232
-138
lines changed
3 files changed +232
-138
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,18 @@ RUN dnf install -y python3-devel postgresql-devel gcc
15
15
16
16
USER gen3
17
17
18
+ # copy ONLY poetry artifact, install the dependencies but not the app;
19
+ # this will make sure that the dependencies are cached
18
20
COPY poetry.lock pyproject.toml /${appname}/
19
-
20
- RUN poetry install -vv --only main --no-interaction
21
+ RUN poetry install -vv --no-root --only main --no-interaction
21
22
22
23
COPY --chown=gen3:gen3 . /${appname}
23
24
24
- # Run poetry again so this app itself gets installed too
25
+ # install the app
25
26
RUN poetry install --without dev --no-interaction
26
27
27
- RUN git config --global --add safe.directory / ${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\" ${COMMIT}\" " > / ${appname}/version_data.py \
28
- && VERSION=`git describe --always --tags` && echo "VERSION=\" ${VERSION}\" " >> / ${appname}/version_data.py
28
+ RUN git config --global --add safe.directory ${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\" ${COMMIT}\" " > ${appname}/version_data.py \
29
+ && VERSION=`git describe --always --tags` && echo "VERSION=\" ${VERSION}\" " >> ${appname}/version_data.py
29
30
30
31
# Final stage
31
32
FROM base
You can’t perform that action at this time.
0 commit comments