-
Notifications
You must be signed in to change notification settings - Fork 509
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
FROM line output inconsistent and confusing when using or disabling the build cache #2991
Comments
Hi @spkane , By printing CACHED in front of FROM statement is that it is already cached and picking it from there. If you see from command is fetching image from docker hub right there is no way it could skip caching it. Image is building block of docker containers. So you put --no-cache or not the images which will you fetch in dockerfile those will be cached and stored in your local. On the second time running this command again then it rebuild the image from scratch because except from all other layers are not cached due to no-cache flag. I hope this justifies the issue stated above. |
@octocamocoder47 Maybe my description wasn't clear enough. I am not confused about WHY it is saying CACHED. I am confused about why it isn't saying CACHED in BOTH use cases. If the base image is CACHED, it only says CACHED when you use |
This looks to be a duplicate of a ticket I once created, because it confused me as well; The explanation here is that For So, it's mostly a presentation issue; comments on my original ticket suggested changing the output to (e.g.)
But the ticket was closed, and I don't know if someone ever got around to opening a proposal in the BuildKit issue tracker for this (https://github.com/moby/buildkit/issues) |
Let me transfer this ticket to the buildx issue tracker (I can't move it to the BuildKit issue tracker, as GitHub doesn't allow transferring between orgs 😅( |
Description
FROM line output inconsistent and confusing when using or disabling the build cache.
Reproduce
Expected behavior
The output for the from line should not change between evocations, or if there is a good reason for it, the output should make that reason much clearer. At the moment, it is very odd, that CACHED shows up when running with
--no-cache
, but does not show up normally, even when the rest of the build is indeed CACHED.docker version
Client: Version: 26.1.3 API version: 1.45 Go version: go1.21.10 Git commit: b72abbb Built: Thu May 16 08:30:38 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.35.1 (173168) Engine: Version: 27.3.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.7 Git commit: 41ca978 Built: Fri Sep 20 11:41:19 2024 OS/Arch: linux/arm64 Experimental: true containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: