diff --git a/build_deploy.sh b/build_deploy.sh index 3edd0b94..f8fb8e6c 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,7 +39,15 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End -docker buildx ls -docker buildx inspect --bootstrap + docker buildx use multiarchbuilder -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . + + +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" . +docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" . + +docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ + "${IMAGE}:${IMAGE_TAG}-amd64" \ + "${IMAGE}:${IMAGE_TAG}-arm64" + +docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file