build-push-action
build-push-action copied to clipboard
Upgrade to docker 25+
Description
I'm trying to setup caching following this AWS blog post, but it currently doesn't work as the current docker version seems to be 24.
What I've done:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to ECR
uses: docker/login-action@v3
with:
registry: <account_id>.dkr.ecr.eu-west-1.amazonaws.com
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: <account_id>.dkr.ecr.eu-west-1.amazonaws.com/<repo_name>:<tag_name>
outputs: type=docker,dest=/tmp/myimage.tar
cache-to: mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=<account_id>.dkr.ecr.eu-west-1.amazonaws.com/<repo_name>:cache,
cache-from: type=registry,ref=<account_id>.dkr.ecr.eu-west-1.amazonaws.com/<repo_name>:cache
Which produces the followigng error in the "Build and push" step:
/usr/bin/docker buildx build --cache-from type=registry,ref=<account_id>.dkr.ecr.eu-west-1.amazonaws.com/<repo_name>:cache --cache-to mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=<account_id>.dkr.ecr.eu-west-1.amazonaws.com/<repo_name>:cache, --iidfile /home/runner/work/_temp/docker-actions-toolkit-wyxfSt/iidfile --output type=docker,dest=/tmp/myimage.tar --platform linux/amd64 --tag<account_id>.dkr.ecr.eu-west-1.amazonaws.com/<repo_name>:<tag_name> --metadata-file /home/runner/work/_temp/docker-actions-toolkit-wyxfSt/metadata-file --push .
ERROR: invalid value
Error: buildx failed with: ERROR: invalid value
From the docker info command executed just before, I found this:
/usr/bin/docker info
Client: Docker Engine - Community
Version: 24.0.9
Any chance the action could be upgraded to 25?