Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker builds again #1339

Merged
merged 5 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions docker/synapse.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down