Buildx always pulls and never reuses images #4564
Replies: 1 comment 2 replies
-
This has nothing to do with the plugin or WP at all, this is just how docker works. If you do a To pin that for the Dockerfile images, you can use sha256 references instead of tags.
Caching has nothing to do with that, this relates to caching layers you've build to reuse them in future builds. I am not sure what you're trying to achieve but
sounds strange as downloading required base images is just "part of the game". If your image just has two RUN statements which finish quickly, it might be that 90% of the time is spent on bootstrapping everything, yes. |
Beta Was this translation helpful? Give feedback.
-
I seem to be missing something somewhere, is it possible to get the buildx plugin to not download the base images and even the buildx image itself on every single build? It seems to download
moby/buildkit:buildx-stable-1
along with the base images in my Dockerfile.I've tried several things, caching which I don't understand and don't think I setup correctly. I tried setting up a pull through cache which didn't seem to work either, probably set that up wrong too. I've set daemon_off to true and pull_image to false, then mapped the host docker socket through (probably a bad idea) but that hasn't worked either. Enabled trusted on the repository.
90% of the build time is spent downloading images that should already exist and there is no real reason to redownload.
I feel there should be a fairly simple way of setting the config to be able keep those images around and reuse them.
Beta Was this translation helpful? Give feedback.
All reactions