-
Notifications
You must be signed in to change notification settings - Fork 29
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
Multi level image builds - only base image is cached #154
Comments
It's actually cached:
This is similar to docker/build-push-action#766 (comment) |
So then its not related. Though still not sure why specific images are not cached, when running same thing directly with I also tried using local cache with |
running into this as well here https://github.com/dotabod/backend/blob/master/docker-compose.yml it only caches the first base image, stops caching after yarn install, and it keeps pushing new images to ghcr even though all the layers are the exact same. i can run teh workflow twice and i'll get two new pushes to the registry i'm expecting only 1 push in that scenario. why is this happening @crazy-max ? you can see the job logs here https://github.com/dotabod/backend/actions/runs/7292673115/job/19874180120 |
i fixed my issue by adding ghcr registry cache-from/to |
Is this related to and fix by doing this? |
Behaviour
Not sure if I am doing it wrong, but I can't make specific images to be cached (if I use
docker buildx bake
locally, it caches everything properly), but using this action, it only caches my base image.Steps to reproduce this issue
For example I tried:
I also tried specifying cache generically like:
Expected behaviour
I would expect to cache all image built, not just base one.
Actual behaviour
Base image is cached, and specific image is always rebuilt even if nothing have changed.
Configuration
My bake file looks like this:
Logs
In logs, part that is cached is actually coming from base image, not specific one.:
Whats interesting, looks like last
COPY
of base image is not cachhed (not sure why):It just copies source code, but maybe its not supposed to be cached?
The text was updated successfully, but these errors were encountered: