diff --git a/.circleci/script/docker b/.circleci/script/docker index f2ec08dc..296e54da 100755 --- a/.circleci/script/docker +++ b/.circleci/script/docker @@ -43,18 +43,16 @@ if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then rm -rf $p done - # alpine doesn't provide upstream arm64 images yet - if [[ $platform == "linux-amd64" ]]; then - tar zxvf "/tmp/release/babashka-${image_tag}-${platform}-static.tar.gz" - docker build -t "$image_name:alpine" "${label_args[@]}" -f Dockerfile.alpine . - rm -f bb - docker tag "$image_name:alpine" "$image_name:$image_tag-alpine" - echo "Pushing image $image_name:$image_tag-alpine" - docker push "$image_name:$image_tag-alpine" - if [[ $snapshot == "false" ]]; then - echo "Pushing image $image_name:alpine" - docker push "$image_name:alpine" - fi + # build alpine image for linux-amd64 only (no upstream arm64 support yet) + tar zxvf "/tmp/release/babashka-${image_tag}-linux-amd64-static.tar.gz" + docker buildx build -t "$image_name:alpine" --platform=linux/amd64 "${label_args[@]}" -f Dockerfile.alpine . + rm -f bb + docker tag "$image_name:alpine" "$image_name:$image_tag-alpine" + echo "Pushing image $image_name:$image_tag-alpine" + docker push "$image_name:$image_tag-alpine" + if [[ $snapshot == "false" ]]; then + echo "Pushing image $image_name:alpine" + docker push "$image_name:alpine" fi else echo "Not publishing Docker image" diff --git a/CHANGELOG.md b/CHANGELOG.md index bbcb42c7..6f8ac41b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ For a list of breaking changes, check [here](#breaking-changes). ## Unreleased - Add opencontainers annoations to docker image [#1134](https://github.com/babashka/babashka/issues/1134) +- Fix Alpine Linux Docker images in CI script [#1140](https://github.com/babashka/babashka/issues/1140) ## 0.7.3 (2021-12-30)