Skip to content

Commit 25448db

Browse files
Test chown (#434)
1 parent 06c8e4d commit 25448db

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

chown/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM mcr.microsoft.com/windows/servercore:1809
2+
RUN net user /add User03 Passw0rd
3+
COPY test C:/test1
4+
COPY --chown=User03 test C:/test2
5+
COPY --chown=ContainerUser test C:/test3
6+
RUN icacls \test1
7+
RUN icacls \test2
8+
RUN icacls \test3

chown/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# COPY --chown
2+
3+
Play a little with `COPY --chown=user` on Windows.
4+
5+
See also
6+
https://github.com/moby/moby/pull/35521
7+
https://github.com/docker/windows-container-utility

chown/test/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# test
2+
3+
Just some test files that will get copied into the container image.

chown/test/hello.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello

0 commit comments

Comments
 (0)