Skip to content

Commit 36a533c

Browse files
committed
Use the --break-system-packages when installing pipenv
Alpine Linux 3.20 configures Python 3 as externally managed, so we need to pass this flag to `pip` to install a Python package directly. Since we are using this to build a Python virtual environment in the `compile-stage` that is moved to the `build-stage` for use in the final image this should pose no issues.
1 parent 5c6819e commit 36a533c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ COPY src/config.toml /root/.cargo/
5151
# Python virtual environment. This is done separately from the virtual
5252
# environment so that pipenv and its dependencies are not installed in the
5353
# Python virtual environment used in the final image.
54-
RUN python3 -m pip install --no-cache-dir --upgrade pipenv==${PYTHON_PIPENV_VERSION} \
54+
RUN python3 -m pip install --break-system-packages --no-cache-dir --upgrade pipenv==${PYTHON_PIPENV_VERSION} \
5555
# Manually create Python virtual environment for the final image
5656
&& python3 -m venv ${VIRTUAL_ENV} \
5757
# Ensure the core Python packages are installed in the virtual environment

0 commit comments

Comments
 (0)