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

cache-image input to enable/disable caching of binfmt image #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Apr 12, 2024

follow-up docker/actions-toolkit#200
related to #110
fixes #166

Tested through ci workflow

first run

setup-qemu-action saves image to hosted tool cache: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986231861#step:3:113

And post cache to upload to GitHub Cache store: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986231861#step:7:3

image

second run

download image from cache and load it: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:105

image


See cache entries as well: https://github.com/docker/setup-qemu-action/actions/caches

@crazy-max crazy-max force-pushed the cache-image branch 3 times, most recently from 490df49 to 67290d2 Compare April 12, 2024 13:32
@crazy-max crazy-max requested a review from tonistiigi April 12, 2024 13:33
@crazy-max crazy-max marked this pull request as ready for review April 12, 2024 13:34
Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this cache get invalidated?

@crazy-max
Copy link
Member Author

How does this cache get invalidated?

when image is downloaded from cache it first loads it to docker store: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:110

and to make sure it's up to date we are doing a new docker pull: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:113

if image is up to date then we got https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:116

Status: Image is up to date for tonistiigi/binfmt:master

Otherwise hosted tool cache is evicted and new image is saved in place.

More info on actions-toolkit repo: https://github.com/docker/actions-toolkit/blob/c70efab546578fc88fb6528cd28de42705cda4be/src/docker/docker.ts#L108

@crazy-max crazy-max requested a review from tonistiigi July 3, 2024 09:53
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

Successfully merging this pull request may close these issues.

Support cache tonistiigi/binfmt docker images
2 participants