Anthony Nandaa, 2023/24
This is a draft area for my todo's, not all of them.
moby/buildkit
and link them. Add help needed
tag where possible.buildkit#616
registry.k8s.io/e2e-test-images/busybox:1.29-2
/client
client/client_test.go testExportedImageLabels
testCacheExportCacheKeyLoop
:
To be continued
This is a working area for the issues before opening them on
moby/buildkit
.
Or for collaborative investigation.
ContainerUser
in Root (WS2019)PS C:\Users\Administrator\sample_dockerfile> Set-Content Dockerfile @"
ββββFROM mcr.microsoft.com/windows/nanoserver:ltsc2022 ββββRUN mkdir hello ββββCOPY hello.txt C:/hello/hello.txt ββββRUN echo "Goodbye!" >> C:/hello/hello.txt ββββCMD ["cmd", "/C", "type C:\\hello\\hello.txt"]
"@
PS C:\Users\Administrator\sample_dockerfile> docker build βno-cache -t hello-buildkit:docker .
Sending build context to Docker daemon 3.072kB
Step 1/5 : FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
β-> 6ad91fb31728
Step 2/5 : RUN mkdir hello
β-> Running in 83274caa0797
Removing intermediate container 83274caa0797
β-> 1af3e89e5d1e
Step 3/5 : COPY hello.txt C:/hello/hello.txt
β-> 24baa07e955e
Step 4/5 : RUN echo "Goodbye!" >> C:/hello/hello.txt
β-> Running in cac8679cf3d6
Access is denied.
The command 'cmd /S /C echo "Goodbye!" >> C:/hello/hello.txt' returned a non-zero code: 1
TODO: try to run the same command with
docker
un-elevated to prove ACL enforcement.
COPY
stanza β #9646Verify if it's really a regression since docker build
throws an error too, until you use front-slashes /
:
CMD
stanza ignored?Cross-check why CMD
is not run:
\
in the progress texts (itβs stripped off)TBD
Access Denied
issue for items at the rootRepro:
You end up with:
This is not a regression:
docker build
also handles it in the same way:
Fix:
Option 1:
USER ContainerAdministrator
to the dockerfile, since the default user is a low-priv ContainerUser
:
Option 2:
If you would like to maintain the low-priv, don't write to the root directory, butter anything inner (and not a system directory like /windows
, etc). Therefore, we will modify the dockerfile
to: