Skip to content

Commit 5fc3ec8

Browse files
committed
docs: windows: add a note about ContainerUser limited permissions
`ContainerUser` is not permitted to write to `C:\` because of their limited permissions, `(WD)` at best. Add a note explaining why we are using `USER ContainerAdministrator` in our dockerfile for us to be able to run: ``` RUN echo "Goodbye!" >> hello.txt ``` On client SKUs like Win11, there will be no issues since `ContainerUser` has `(M)` permissions on `C:\` Fixes moby#4731 as by-design. Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
1 parent 23a2b6f commit 5fc3ec8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/windows.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ Now that everything is setup, let's build a [simple _hello world_ image](https:/
154154
This message shows that your installation appears to be working correctly.
155155
"@
156156
```
157+
158+
> **NOTE:** Writing to a file directly under `C:\` needs extra permissions, hence use of `ContainerAdministrator`.
159+
> `ContainerUser` is the default user for `nanoserver` images. See more details at [#4731](https://github.com/moby/buildkit/issues/4731).
160+
157161
1. Build and push to your registry (or set to `push=false`). For Docker Hub, make sure you've done `docker login`. See more details on registry configuration [here](../README.md#imageregistry)
158162
159163
```powershell

0 commit comments

Comments
 (0)