Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to docker 25+ #1124

Closed
koleror opened this issue May 17, 2024 · 2 comments
Closed

Upgrade to docker 25+ #1124

koleror opened this issue May 17, 2024 · 2 comments

Comments

@koleror
Copy link

koleror commented May 17, 2024

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?

@koleror koleror added kind/enhancement New feature or request status/triage labels May 17, 2024
@crazy-max crazy-max removed kind/enhancement New feature or request status/triage labels May 27, 2024
@crazy-max
Copy link
Member

crazy-max commented May 27, 2024

I assume you're using ubuntu-latest or ubuntu-22.04 runner image: https://github.com/actions/runner-images?tab=readme-ov-file#available-images

Which currently ships Docker 24.0: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

We are not maintaining applications installed on GitHub public runners so I suggest to ask on their issue tracker: https://github.com/actions/runner-images/issues or you can switch to ubuntu-24.04 image which has Docker 26.1 installed: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md

@koleror
Copy link
Author

koleror commented May 29, 2024

Just figured this out! Thanks for answering!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants