diff --git a/Dockerfile b/Dockerfile index 7448331..bc16df3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM public.ecr.aws/docker/library/node:22-alpine3.20 # Install git for gitea actions and ansible -RUN apk add --no-cache git curl unzip docker-cli-buildx bash containerd +RUN apk add --no-cache git curl unzip docker-cli-buildx bash WORKDIR /usr/src diff --git a/entrypoint.sh b/entrypoint.sh index 4a89328..ee2b35e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,7 +29,7 @@ fi; DOCKER_BUILD_OPTIONS=("--progress" "plain" "-t" "$IMAGE_NAME") if [ -n "$INPUT_PLATFORM" ]; then - DOCKER_BUILD_OPTIONS+=("--platform" "$INPUT_PLATFORM") + DOCKER_BUILD_OPTIONS+=("--platform" "$INPUT_PLATFORM" "--pull") fi if [ "$INPUT_PUSH_IMAGE" = "true" ]; then @@ -39,7 +39,7 @@ fi if [ "$INPUT_PULL_CACHE" = "true" ]; then IMAGE_CACHE_NAME="${IMAGE_NAME%%:*}:build-cache" DOCKER_BUILD_OPTIONS+=("--cache-from" "type=registry,ref=${IMAGE_CACHE_NAME}") - DOCKER_BUILD_OPTIONS+=("--cache-to" "type=registry,ref=${IMAGE_CACHE_NAME},mode=max") + DOCKER_BUILD_OPTIONS+=("--cache-to" "type=registry,image-manifest=true,oci-mediatypes=true,ref=${IMAGE_CACHE_NAME},mode=max") echo "Using docker image cache ${IMAGE_CACHE_NAME}" fi