File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,11 @@ FROM python:3.10-buster as builder
66
77RUN pip install poetry==1.8.4
88
9- # POETRY_VIRTUALENVS_CREATE=1: Makes sure that environment will be as isolated as possible and above all that
10- # installation will not mess up with the system Python or, even worse, with Poetry itself.
119# POETRY_CACHE_DIR: When removing the cache folder, make sure this is done in the same RUN command. If it’s done in a
1210# separate RUN command, the cache will still be part of the previous Docker layer (the one containing poetry install )
1311# effectively rendering your optimization useless.
1412
1513ENV POETRY_NO_INTERACTION=1 \
16- POETRY_VIRTUALENVS_IN_PROJECT=1 \
17- POETRY_VIRTUALENVS_CREATE=1 \
1814 POETRY_CACHE_DIR=/tmp/poetry_cache
1915
2016WORKDIR /root
@@ -34,10 +30,9 @@ FROM python:3.10-slim-buster as runtime
3430LABEL image.author.name="Judith Bernett"
3531LABEL image.author.email=
"[email protected] " 3632
37- ENV VIRTUAL_ENV=/root/.venv \
38- PATH="/root/.venv/bin:$PATH"
39-
40- COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
33+ # Copy installed dependencies from the builder image
34+ COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
35+ COPY --from=builder /usr/local/bin /usr/local/bin
4136
4237# Copy all relevant code
4338
You can’t perform that action at this time.
0 commit comments