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
This commit is contained in:
Richard van der Hoff 2020-12-09 15:48:39 +00:00
parent 244bff4edd
commit 9bbbb11ac2
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,6 @@ jobs:
- image: docker:git - image: docker:git
steps: steps:
- checkout - checkout
- setup_remote_docker
- docker_prepare - docker_prepare
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- docker_build: - docker_build:
@ -20,7 +19,6 @@ jobs:
- image: docker:git - image: docker:git
steps: steps:
- checkout - checkout
- setup_remote_docker
- docker_prepare - docker_prepare
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- docker_build: - docker_build:
@ -46,12 +44,16 @@ workflows:
commands: commands:
docker_prepare: 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: parameters:
buildx_version: buildx_version:
type: string type: string
default: "v0.4.1" default: "v0.4.1"
steps: 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: apk add --no-cache curl
- run: mkdir -vp ~/.docker/cli-plugins/ ~/dockercache - 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 - 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

1
changelog.d/8906.misc Normal file
View File

@ -0,0 +1 @@
Fix multiarch docker image builds.