-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman build
not invalidating layers after a change in a --mount=type=bind
directory
#23382
Comments
I think this can be easily solved by adding hash of directory to the history, i'd like to propose a solution if @nalind agrees then I can create a patch. As of now buildah adds history to images for Current
Proposed
|
When the source is in the build context or a previous stage, I guess that'll work. When it's in an image, it's going to be cheaper to use the image's digest. |
I agree, in case of image it can be digest. I can take a stab at it. |
Issue Description
When building an image using
podman build
and a build mount of type--mount=type=bind
- a change in content within that mount directory does not cause the layer of the build to be invalidated and run again.docker build
on the other hand does do this - I would expect the same behaviour between both programsSteps to reproduce the issue
I have a demo of the problem at https://github.com/AndrewLipscomb/podman-build-cache-issue-demo/tree/main
But in short
For some reproduction instructions in full
Tested with podman 5.0.3 and podman 5.1.2 - both did the same thing
Docker version for comparison was
Describe the results you received
The layer is not invalidating on a mount directory content change
Describe the results you expected
The layer should invalidate on a mount directory content change
podman info output
The text was updated successfully, but these errors were encountered: