Skip to content

Commit 37175c1

Browse files
committed
Fix qemu
1 parent e9ab538 commit 37175c1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.buildkite/steps/build-docker-image.sh

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ builder_name=$(docker buildx create --use)
6060
# shellcheck disable=SC2064 # we want the current $builder_name to be trapped, not the runtime one
6161
trap "docker buildx rm $builder_name || true" EXIT
6262

63+
QEMU_VERSION=6.2.0
64+
echo "--- Installing QEMU $QEMU_VERSION"
65+
docker run --privileged --userns=host --rm "tonistiigi/binfmt:qemu-v$QEMU_VERSION" --uninstall qemu-*
66+
docker run --privileged --userns=host --rm "tonistiigi/binfmt:qemu-v$QEMU_VERSION" --install all
67+
6368
echo "--- Building :docker: $image_tag"
6469
cp -a packaging/linux/root/usr/share/buildkite-agent/hooks/ "${packaging_dir}/hooks/"
6570
cp pkg/buildkite-agent-linux-{amd64,arm64} "$packaging_dir"

packaging/docker/ubuntu-22.04/Dockerfile

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ SHELL [ "bash", "-euc" ]
1212
RUN <<BASH
1313
export DEBIAN_FRONTEND=noninteractive
1414

15-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
16-
add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
17-
1815
apt-get update
1916
apt-get install -y --no-install-recommends \
2017
apt-transport-https \
2118
bash \
2219
ca-certificates \
2320
curl \
24-
docker-ce-cli \
25-
docker-compose-plugin \
2621
git \
2722
gnupg-agent \
2823
jq \
@@ -34,6 +29,10 @@ apt-get install -y --no-install-recommends \
3429
software-properties-common \
3530
tini
3631

32+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
33+
add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
34+
apt-get update
35+
apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin
3736
rm -rf /var/lib/apt/lists/*
3837

3938
pip3 install docker-compose==$DOCKER_COMPOSE_VERSION

0 commit comments

Comments
 (0)