summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-12-09 15:48:39 +0000
committerRichard van der Hoff <richard@matrix.org>2020-12-09 15:51:11 +0000
commit9bbbb11ac20896629c25b160fa3cebef29431bfe (patch)
tree02fcd8090ee0fc42ac827e57d29873870b62ed08
parentUpdate changelog (diff)
downloadsynapse-9bbbb11ac20896629c25b160fa3cebef29431bfe.tar.xz
Pin the docker version for multiarch builds
It seems that letting CircleCI use its default docker version (17.09.0-ce,
apparently) did not interact well with multiarch builds: in particular, we saw
weird effects where running an amd64 build at the same time as an arm64 build
caused the arm64 builds to fail with:

   Error while loading /usr/sbin/dpkg-deb: No such file or directory
Diffstat (limited to '')
-rw-r--r--.circleci/config.yml8
-rw-r--r--changelog.d/8906.misc1
2 files changed, 6 insertions, 3 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index b10cbedd6d..088da55735 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -5,7 +5,6 @@ jobs:
       - image: docker:git
     steps:
       - checkout
-      - setup_remote_docker
       - docker_prepare
       - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
       - docker_build:
@@ -20,7 +19,6 @@ jobs:
       - image: docker:git
     steps:
       - checkout
-      - setup_remote_docker
       - docker_prepare
       - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
       - docker_build:
@@ -46,12 +44,16 @@ workflows:
 
 commands:
   docker_prepare:
-    description: Downloads the buildx cli plugin and enables multiarch images
+    description: Sets up a remote docker server, downloads the buildx cli plugin, and enables multiarch images
     parameters:
       buildx_version:
         type: string
         default: "v0.4.1"
     steps:
+      - setup_remote_docker:
+          # 19.03.13 was the most recent available on circleci at the time of
+          # writing.
+          version: 19.03.13
       - run: apk add --no-cache curl
       - run: mkdir -vp ~/.docker/cli-plugins/ ~/dockercache
       - run: curl --silent -L "https://github.com/docker/buildx/releases/download/<< parameters.buildx_version >>/buildx-<< parameters.buildx_version >>.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
diff --git a/changelog.d/8906.misc b/changelog.d/8906.misc
new file mode 100644
index 0000000000..8b95e4c553
--- /dev/null
+++ b/changelog.d/8906.misc
@@ -0,0 +1 @@
+Fix multiarch docker image builds.