-
Notifications
You must be signed in to change notification settings - Fork 787
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
bud: COPY . . too aggressive with caching #1780
Comments
@QiWang19 I think you've been working on a related issue? |
Came here from containers/podman#3920 - this issue seems to be isolated to multi-stage builds for me, single-stage builds seem to cache correctly. Podman 1.5.1. |
I think this is now working in Buildah 1.10.1, or perhaps my testing was off? @adambkaplan could you verify the following test? I'm seeing the cache being reused only when the file has not changed.
|
I've not been able to duplicate this using Buildah v1.11.0 which should be in the next release of Podman. I'm not sure if that will be Podman 1.5.1 or Podman 1.6.0, but it will be contained that next version. I'm going to close this now as #1792 appears to have fixed the issue. If you find otherwise, please feel free to reopen this or create a new issue as appropriate. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
During
podman build
, if the Dockerfile contains theCOPY . .
instruction, podman uses cache even if the underlying files change in a meaningful waySteps to reproduce the issue:
Start in a git repository with a Dockerfile that contains a
COPY . .
instruction. Example: https://github.com/openshift/cluster-image-registry-operatorrun
$ podman build -t myimage:mytag .
Change a file within Podman's build context (ex: add text to README.md)
Re-run
$ podman build -t myimage:mytag .
Describe the results you received:
Podman uses a cached layer:
Describe the results you expected:
Podman should have done a fresh copy to pull in new content.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora 30 desktop
Output of
cat /etc/*release
:Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:The text was updated successfully, but these errors were encountered: