From 655e88b7bae6a589014a986bebd7367c5ab6d203 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 30 Sep 2024 13:45:20 -0400 Subject: [PATCH] Only update qemu-static container settings on x86_64 The image only support x86_64 so if you're running this role against an arm64 node, this breaks. Change-Id: Ied74ef9e4337346910c817ea5f3540af9ccfdf0b --- roles/build-container-image/tasks/setup-buildx.yaml | 1 + roles/build-docker-image/tasks/setup-buildx.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/build-container-image/tasks/setup-buildx.yaml b/roles/build-container-image/tasks/setup-buildx.yaml index d934a60b7..81f100c48 100644 --- a/roles/build-container-image/tasks/setup-buildx.yaml +++ b/roles/build-container-image/tasks/setup-buildx.yaml @@ -1,5 +1,6 @@ - name: Update qemu-static container settings command: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + when: ansible_architecture == 'x86_64' - name: Create builder command: "docker buildx create --name mybuilder --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %}" diff --git a/roles/build-docker-image/tasks/setup-buildx.yaml b/roles/build-docker-image/tasks/setup-buildx.yaml index afbb8a353..f42f93097 100644 --- a/roles/build-docker-image/tasks/setup-buildx.yaml +++ b/roles/build-docker-image/tasks/setup-buildx.yaml @@ -2,6 +2,7 @@ command: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes environment: DOCKER_CLI_EXPERIMENTAL: enabled + when: ansible_architecture == 'x86_64' - name: Create builder command: "docker buildx create --name mybuilder --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %}"