diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b2846e63b..c4d0c1e1a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,6 +12,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-sytest-images: name: "Build sytest:${{ matrix.tag }}" @@ -25,8 +29,6 @@ jobs: tag: buster - base_image: debian:testing tag: testing - - base_image: debian:bookworm - tag: bookworm steps: - name: Set up QEMU id: QEMU @@ -74,11 +76,9 @@ jobs: - sytest_image_tag: testing dockerfile: synapse tags: "matrixdotorg/sytest-synapse:testing" - build_args: "SYTEST_IMAGE_TAG=testing" - - sytest_image_tag: bookworm - dockerfile: synapse - tags: "matrixdotorg/sytest-synapse:bookworm" - # Note: at the time of writing, bookworm's python3 is python 3.11. + build_args: | + SYTEST_IMAGE_TAG=testing + SYSTEM_PIP_INSTALL_SUFFIX=--break-system-packages steps: - name: Set up QEMU diff --git a/docker/synapse.Dockerfile b/docker/synapse.Dockerfile index 14187ea6d..fdb5673c9 100644 --- a/docker/synapse.Dockerfile +++ b/docker/synapse.Dockerfile @@ -3,6 +3,7 @@ ARG SYTEST_IMAGE_TAG=buster FROM matrixdotorg/sytest:${SYTEST_IMAGE_TAG} ARG PYTHON_VERSION=python3 +ARG SYSTEM_PIP_INSTALL_SUFFIX="" ENV DEBIAN_FRONTEND noninteractive @@ -26,8 +27,8 @@ RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-tool # For now, we need to tell Debian we don't care that we're editing the system python # installation. # Some context in https://github.com/pypa/pip/issues/11381#issuecomment-1399263627 -RUN ${PYTHON_VERSION} -m pip install -q --upgrade pip --break-system-packages -RUN ${PYTHON_VERSION} -m pip install -q --no-cache-dir poetry==1.3.2 --break-system-packages +RUN ${PYTHON_VERSION} -m pip install -q --upgrade pip ${SYSTEM_PIP_INSTALL_SUFFIX} +RUN ${PYTHON_VERSION} -m pip install -q --no-cache-dir poetry==1.3.2 ${SYSTEM_PIP_INSTALL_SUFFIX} # As part of the Docker build, we attempt to pre-install Synapse's dependencies # in the hope that it speeds up the real install of Synapse. To make this work,