Skip to content

Commit

Permalink
Fix qemu
Browse files Browse the repository at this point in the history
  • Loading branch information
triarius committed Feb 25, 2023
1 parent e9ab538 commit 9885156
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .buildkite/steps/build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ builder_name=$(docker buildx create --use)
# shellcheck disable=SC2064 # we want the current $builder_name to be trapped, not the runtime one
trap "docker buildx rm $builder_name || true" EXIT

QEMU_VERSION=6.2.0
echo "--- Installing QEMU $QEMU_VERSION"
docker run --privileged --userns=host --rm "tonistiigi/binfmt:qemu-v$QEMU_VERSION" --uninstall qemu-*
docker run --privileged --userns=host --rm "tonistiigi/binfmt:qemu-v$QEMU_VERSION" --install all

echo "--- Building :docker: $image_tag"
cp -a packaging/linux/root/usr/share/buildkite-agent/hooks/ "${packaging_dir}/hooks/"
cp pkg/buildkite-agent-linux-{amd64,arm64} "$packaging_dir"
Expand Down
15 changes: 8 additions & 7 deletions packaging/docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ ARG TARGETARCH

ENV DOCKER_COMPOSE_VERSION=1.27.4

SHELL [ "bash", "-euc" ]

RUN <<BASH
export DEBIAN_FRONTEND=noninteractive
#!/usr/bin/env bash

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
set -eufo pipefail

export DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https \
bash \
ca-certificates \
curl \
docker-ce-cli \
docker-compose-plugin \
git \
gnupg-agent \
jq \
Expand All @@ -34,6 +31,10 @@ apt-get install -y --no-install-recommends \
software-properties-common \
tini

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

pip3 install docker-compose==$DOCKER_COMPOSE_VERSION
Expand Down

0 comments on commit 9885156

Please sign in to comment.