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 is not used for docker build . #830

Open
juntyr opened this issue Oct 21, 2024 · 0 comments
Open

Cache is not used for docker build . #830

juntyr opened this issue Oct 21, 2024 · 0 comments

Comments

@juntyr
Copy link

juntyr commented Oct 21, 2024

I'm building a Docker dev container in CI, which is used to run some later steps in a pre-defined environment. The Dockerfile is part of the project and changes very infrequently.

In one step, I use ScribeMD/[email protected] to cache the full Docker image. Since the workflow has run before, I get a cache hit and it prints that

Cache restored successfully
docker load --input ~/.docker-images.tar
Loaded image ID: sha256:64b4debbb775ec6f4d258e72c4a44de2f9341b44be1347974e3ddf8db411bb4c

In the next step, I call docker build .. Even though the Dockerfile is unchanged, the build restarts from scratch.

Is there anything else I need to do to use the cached Dockerfile? The cache key includes the hash of the Dockerfile, so it will only have a cache hit if an exact match was already built.

Thanks for your help!

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

No branches or pull requests

1 participant