-
Notifications
You must be signed in to change notification settings - Fork 501
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
[BUG] --no-cache
is not respected for git sources
#2924
Comments
Can you please double check issue isn't the same with a plain |
@ndeloof thanks for following up, this is in fact also a bug with regular
This command exhibits the same behavior of not respecting |
@glours do you have permission to transfert issues to docker/buildx ? I don't |
I think so |
I don't 😭 |
I can't repro with Git HTTP source. I wonder if this is an SSH forwarding issue when checking out git repos in BuildKit 🤔 What's the output of:
|
Could this be a presentation issue, or did it actually fail to check? ISTR there were cases where it would perform the check, discovered the cache was still valid after checking git, and because of that printed "CACHED" (and there was some discussion if those could be presented as "CHECKED" (or something) to indicate that it did check again. |
Looking at OP's report it looks like it:
|
Doh! Overlooked that from my phone; ignore me then 😅 |
This comment has been minimized.
This comment has been minimized.
Seeing If you are building from |
@crazy-max here's the output:
Would this include activity done on behalf of @tonistiigi thanks for clarifying this - unfortunately the repo in question doesn't get updated frequently, but I will report back next time it does get updated to see if this still happens. |
@willarmiros Are you saying that the
The |
@tonistiigi sorry for the confusion, the However previously when using |
Description
I have a service in a docker compose that builds using a Dockerfile in a remote git repo, defined like so:
When re-building a service with the
--no-cache
flag, I would expect caching to be skipped for ALL parts of the build, including making a fresh call to retrieve the source code from git. However this is not the case, as I can see in the first line of the output:I also confirmed that the contents of the container/service are an outdated version of content in that repo. When I change the git ref to be a commit hash or some branch other than
main
, it then actually re-pulls from the git source as I expect. For example:After changing the ref to the latest commit in the repo, I confirmed the service was actually updated with the latest source code. My ask is for the
--no-cache
flag to do this for me without needing to make manual changes.Steps To Reproduce
Have a compose file like:
Run
docker compose build --no-cache my-service
See in the first line of the output:
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: