-
Notifications
You must be signed in to change notification settings - Fork 18.8k
builder: fix COPY --from
should preserve ownership
#38599
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
Conversation
1c3a167
to
d335b2c
Compare
Codecov Report
@@ Coverage Diff @@
## master #38599 +/- ##
==========================================
- Coverage 36.47% 36.25% -0.23%
==========================================
Files 613 620 +7
Lines 45814 48057 +2243
==========================================
+ Hits 16709 17421 +712
- Misses 26823 28250 +1427
- Partials 2282 2386 +104 |
08fc497
to
de5d2d4
Compare
ping @AkihiroSuda @tonistiigi PTAL |
Does this also apply to extra permission bits such as sticky or set[ug]id? |
de5d2d4
to
5336a4c
Compare
No, this should only handle permissions; I think those should work if you use BuiltKit as builder ( |
Rebased to re-run CI; ping @AkihiroSuda @tonistiigi @tiborvass PTAL |
When copying between stages, or copying from an image, ownership of the copied files should not be changed, unless the `--chown` option is set (in which case ownership of copied files should be updated to the specified user/group). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
5336a4c
to
6d87f19
Compare
Rebased (again) to re-run CI; ping @AkihiroSuda @tonistiigi @tiborvass PTAL |
@tonistiigi @tiborvass this LGTY? |
@thaJeztah does this change (partially) fix #34645 where some single-stage build and all (almost all) multi-stage builds that copy files fail if |
Haven't tried it myself, but given that no ownership is changed, I expect "yes" You can download a nightly build or install a beta/release candidate for Docker 19.03 if you want to test |
When copying between stages, or copying from an image, ownership of the copied files should not be changed (unless the
--chown
option is set, in which case ownership of copied files should be updated to the specified user/group).- Description for the changelog