-
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
appears to incorrectly reuse layers
#2544
Comments
@umohnani8 @TomSweeneyRedHat Any ideas? |
No thoughts off the top of my head. I'll try to give it a run or three to see if I can spot anything. @umohnani8 any thoughts from you? |
I think the cache check to see if what is being copied in has changed or not isn't working as expected. It is seeing that there is no change hence using the cached layer. I can look into it. |
@TomSweeneyRedHat @umohnani8 @nalind @miabbott Is this still broken? |
Yep, just tested, still broken. @nalind's latest layer changes didn't get this one fixed unfortunately. |
May be related to containers/buildah#1391 |
@TomSweeneyRedHat @miabbott is this still an issue? |
I think this is fixed, Reopen if this is still an issue. |
@baude yeah, still looks busted to me
|
I don't have permissions to re-open this, but I think it is still a problem |
@miabbott Could you re-test with podman 1.3.1 or newer? I was encountering a very similar issue and verified my fix is in that version (containers/buildah#1511) |
@danstiner Yup, latest
|
No problem, glad it worked :) |
I'm experiencing this issue with podman 1.5.0 on Ubuntu 18.04 ( I have a line in the Dockerfile, e.g. And it doesn't seem to recognise when files have changed, and it reuses the layer. Works fine with Docker Build command line: When changing the current directory to one level up, it doesn't use the cache at all, even for commands that are exactly the same, and don't use COPY. |
@shaicoleman Please open a new issue, if you believe this is a new problem. |
/kind bug
We have a tests for Red Hat Enterprise Linux CoreOS (RHCOS), where we create small container images on the fly in order to test certain pieces of functionality. We essentially use a simple shell script that looks like this:
When we run it in succession, the second container image that is created appears to reuse the layer from the first container image that corresponds to the
COPY
command:As shown above, the second image (
localhost/ping
):Now, if I were to use the same script and replace
podman
withdocker
, I would get usable images. This was done on a Fedora AH host:This looks like a break in compatibility with
docker
. (Also, if I repeat this test withpodman 0.12.1.2
, it behaves the same asdocker
, so it also looks like this is a regression)Now, if I use
podman build --layers=false
, I can avoid the reuse problem that I am seeing. However, it feels like I should not have to specify this extra parameter to get my images functional.The text was updated successfully, but these errors were encountered: