-
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
COPY reuses cache even when files have changed
#3920
Comments
@TomSweeneyRedHat PTAL |
Happens also with 1.5.1 |
Same problem using multi-stage build and using |
Probably best if these issues were opened on github.com:containers/buildah then on podman, since podman is just vendoring in buildah code. |
I'm going to leave this open for now, but believe it's a duplicate of containers/buildah#1780 |
@shaicoleman could you please verify my test methodology on containers/buildah#1780 and let me know if that's off from yours? @E100Beta you mentioned single-stage builds were OK for you, but multi-stage ones were not. Do you have an example of a bad multi-stage build that you could share? |
@TomSweeneyRedHat, I used the podman build command rather than calling |
@TomSweeneyRedHat will Dockerfile be enough?
|
@shaicoleman I can confirm that containers/buildah#1792 was not part of v1.10.1. That landed in v1.11.0 @E100Beta Dockerfiles always wor the best for me when trying to track down build issues. I'll try yours above and/or refactor mine to get an "AS" clause in play. There may still be an issue in that scenario. Thanks all! |
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 containers/buildah#1792 appears to have fixed the issue. If you find otherwise, please feel free to reopen this or create a new issue as appropriate. |
Still happening to me with podman 1.6.1 (comes with buildah 1.11.2) on Ubuntu, with the following command Are archives also checksummed? |
@TomSweeneyRedHat Could you check this out? |
@rhatdan ack, added on to the list to check into today/tomorrow. |
Issue reopened in Buildah at: containers/buildah#1906 |
See containers/buildah#1955 I've confirmed that this test fails under podman-1.6.2-2.fc30 and passes under current master. Signed-off-by: Ed Santiago <[email protected]>
test for #3920 (improper caching of tarballs in build)
/kind bug
Description
Similar to issue #2544 , might be related to #3921
Steps to reproduce the issue:
After running the initial build
In the Dockerfile I have a COPY line, e.g.
COPY --chown=myuser:myuser config myapp/config/
I run the build command:
sudo podman build --rm --build-arg RAILS_ENV=development --build-arg NODE_ENV=development --file rails/Dockerfile -t myimage ..
After changing the files, and rerunning the build, it reuses the cache, even though it shouldn't.
Additional information you deem important (e.g. issue happens only occasionally):
When this happens I have to delete
/var/lib/containers
to fix the issue.Output of
podman version
:Output of
podman info --debug
:debug:
compiler: gc
git commit: ""
go version: go1.10.4
podman version: 1.5.0
host:
BuildahVersion: 1.10.1
Conmon:
package: 'conmon: /usr/libexec/podman/conmon'
path: /usr/libexec/podman/conmon
version: 'conmon version 2.0.0, commit: unknown'
Distribution:
distribution: linuxmint
version: "19.2"
MemFree: 5022597120
MemTotal: 16622612480
OCIRuntime:
package: 'containerd.io: /usr/bin/runc'
path: /usr/bin/runc
version: |-
runc version 1.0.0-rc8
commit: 425e105d5a03fabd737a126ad93d62a9eeede87f
spec: 1.0.1-dev
SwapFree: 16986927104
SwapTotal: 16986927104
arch: amd64
cpus: 12
eventlogger: journald
hostname: shai-5591
kernel: 5.0.0-25-generic
os: linux
rootless: false
uptime: 21m 22.48s
registries:
blocked: null
insecure: null
search: null
store:
ConfigFile: /etc/containers/storage.conf
ContainerStore:
number: 4
GraphDriverName: overlay
GraphOptions: null
GraphRoot: /var/lib/containers/storage
GraphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 35
RunRoot: /var/run/containers/storage
VolumePath: /var/lib/containers/storage/volumes
podman/bionic,now 1.5.0-2~ubuntu18.04~ppa5 amd64 [installed]
The text was updated successfully, but these errors were encountered: