From d0306d37478b3d96fffeea85ea7efe95b36d517d Mon Sep 17 00:00:00 2001 From: Kuniwak Date: Fri, 29 Mar 2024 07:48:54 +0900 Subject: [PATCH] Fix platform for container images (2) --- scripts/build-image | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build-image b/scripts/build-image index 3171f3f..707e1b0 100755 --- a/scripts/build-image +++ b/scripts/build-image @@ -34,17 +34,17 @@ main() { local image image="$("$BASE_DIR/scripts/print-image-name" < "$DOCKERFILE")" - docker build -t "$image:$version" -f "$DOCKERFILE" . + docker build --platform linux/amd64 -t "$image:$version" -f "$DOCKERFILE" . if [[ "$arg" == "--latest" ]]; then docker tag "$image:$version" "$image:latest" fi - docker build -t "$gh_action_image:$version" -f "$GH_ACTION_DOCKERFILE" . + docker build --platform linux/amd64 -t "$gh_action_image:$version" -f "$GH_ACTION_DOCKERFILE" . if [[ "$arg" == "--latest" ]]; then docker tag "$gh_action_image:$version" "$gh_action_image:latest" fi - docker build -t "$circleci_image:$version" -f "$CIRCLECI_DOCKERFILE" . + docker build --platform linux/amd64 -t "$circleci_image:$version" -f "$CIRCLECI_DOCKERFILE" . if [[ "$arg" == "--latest" ]]; then docker tag "$circleci_image:$version" "$circleci_image:latest" fi