builder: fix COPY --from should preserve ownership#38599
builder: fix COPY --from should preserve ownership#38599tiborvass merged 1 commit intomoby:masterfrom
COPY --from should preserve ownership#38599Conversation
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
integration/build/testdata/Dockerfile.testBuildPreserveOwnership
Outdated
Show resolved
Hide resolved
integration/build/testdata/Dockerfile.testBuildPreserveOwnership
Outdated
Show resolved
Hide resolved
|
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
--chownoption is set, in which case ownership of copied files should be updated to the specified user/group).- Description for the changelog