File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ ENV BUILD_ENVIRONMENT=${BUILD_ENVIRONMENT} \
1212 PIP_NO_CACHE_DIR=off \
1313 PIP_DISABLE_PIP_VERSION_CHECK=on \
1414 PIP_DEFAULT_TIMEOUT=100 \
15+ PIP_CACHE_DIR=/root/.cache/pip \
1516 # Poetry's configuration:
1617 POETRY_NO_INTERACTION=1 \
1718 POETRY_VIRTUALENVS_CREATE=false \
@@ -35,7 +36,9 @@ WORKDIR /app
3536COPY pyproject.toml poetry.lock* /app/
3637
3738# Configure Poetry to not create a virtual environment and install dependencies
38- RUN poetry install $(test "$BUILD_ENVIRONMENT" == production && echo "--only=main" )
39+ RUN --mount=type=cache,target=$POETRY_CACHE_DIR \
40+ --mount=type=cache,target=$PIP_CACHE_DIR \
41+ poetry install $(test "$BUILD_ENVIRONMENT" == production && echo "--only=main" )
3942
4043# Copy the rest of the project
4144COPY . /app
You can’t perform that action at this time.
0 commit comments