-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
COPY cache not re-used depending on SELinux environment #1330
Comments
Is this fix already included in the current Docker Release v19.03.8? I still have this issue with my local Mac OS v10.14 and Ubuntu v18.04. |
I too have the same issue running v19.03.9 on macOS and Ubuntu. Both machines produce reproducible image IDs when using It looks like moby/moby references buildkit commit ae7ff71 which does include this change, so I'm confused why it's still creating differing IDs between the 2 systems. @tonistiigi sorry for the @, but is there any chance you can confirm whether this is currently in docker-ce v19.03.9? A couple of us are still having issues and would just like to know if it's something else or indeed the same issue due to it not being released yet. Thanks. |
This fix is not in 19.03 |
full diff: moby/buildkit@dc6afa0...4cb720e - contenthash: ignore system and security xattrs in calculation - fixes moby/buildkit#1330 COPY cache not re-used depending on SELinux environment - fixes moby#39003 (comment) - contenthash: allow security.capability in cache checksum - inline cache: fix handling of duplicate blobs - fixes moby/buildkit#1388 cache-from working unreliably Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: moby/buildkit@dc6afa0...4cb720e - contenthash: ignore system and security xattrs in calculation - fixes moby/buildkit#1330 COPY cache not re-used depending on SELinux environment - fixes moby/moby#39003 (comment) - contenthash: allow security.capability in cache checksum - inline cache: fix handling of duplicate blobs - fixes moby/buildkit#1388 cache-from working unreliably Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 23d47bd12eaeeb93bbc4e9e80020c811e9eb2980 Component: engine
Opened as requested by @thaJeztah in moby/moby#39003 (comment)_
When attempting to
docker build
with--cache-from
the cache for COPY (and presumably ADD) commands is ignored if the two systems do not both use SELinux.For example, if you were to build an image on Ubuntu (No SELinux) and use the image as a cache in CentOS (SELinux enabled by default), the cache is ignored for COPY commands. The same is true vice-versa.
To reproduce
I have done the following on Ubuntu 18.04 with Docker 19.03.5
And then
Push this image to a docker repository somewhere.
Then on a CentOS machine (Or anything with SELinux), create the same Dockerfile and run:
You'll see that the cache isn't used for the COPY command. I have assumed this is due to the SELinux permissions, if you build the same image on the same machine with SELinux where
this-is-a-file
has different security context you'll notice the same issue.The text was updated successfully, but these errors were encountered: