From 0693a51beed0ec04f580ff0b9c20315fd9ef09e3 Mon Sep 17 00:00:00 2001 From: Michael Kotten Date: Thu, 5 Oct 2023 08:51:19 +0200 Subject: [PATCH 1/2] Build for arm64 --- scripts/build_push_docker.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/build_push_docker.sh b/scripts/build_push_docker.sh index f8ff2750..003c17de 100755 --- a/scripts/build_push_docker.sh +++ b/scripts/build_push_docker.sh @@ -11,12 +11,11 @@ else fi echo "building ${TAG}" -docker build -t ${IMAGE_NAME}:${TAG} . - echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin -docker push ${IMAGE_NAME}:${TAG} - -if [ -z "$(echo $TAG | grep -E "beta|master")" ]; then - docker tag ${IMAGE_NAME}:${TAG} ${IMAGE_NAME}:latest - docker push ${IMAGE_NAME}:latest +tags=() +tags+=${IMAGE_NAME}:${TAG} +if [[ $TAG != *"beta"* ]] && [[ $TAG != *"master"* ]]; then + tags+={IMAGE_NAME}:latest fi + +docker buildx build --platform linux/amd64,linux/arm64 --push -t ${tags[@]} . From 27134ca3beea65141657dea365dfe20f458a995b Mon Sep 17 00:00:00 2001 From: Michael Kotten Date: Thu, 5 Oct 2023 09:27:50 +0200 Subject: [PATCH 2/2] adding suggestion from PR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com> --- scripts/build_push_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_push_docker.sh b/scripts/build_push_docker.sh index 003c17de..9c59569a 100755 --- a/scripts/build_push_docker.sh +++ b/scripts/build_push_docker.sh @@ -14,7 +14,7 @@ echo "building ${TAG}" echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin tags=() tags+=${IMAGE_NAME}:${TAG} -if [[ $TAG != *"beta"* ]] && [[ $TAG != *"master"* ]]; then +if [ -z "$(echo $TAG | grep -E "beta|master")" ]; then tags+={IMAGE_NAME}:latest fi