Skip to content

Commit c9ac9e1

Browse files
author
Mano Marks
authored
Merge pull request docker#237 from mbentley/fix-userns-formatting
Fixed code block formatting issues with indentation
2 parents d9f70b0 + 3a601be commit c9ac9e1

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

security/userns/README.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ You must perform this step while logged in as the **ubuntu** user.
3535
3636
root 8715 0.0 1.0 352332 38820 ? Ssl 12:56 0:01 /usr/bin/dockerd -H fd://
3737
ubuntu 8896 0.0 0.0 8216 2188 pts/0 S+ 13:45 0:00 grep --color=auto dockerd
38-
3938
```
4039

4140
The first line shows the Docker daemon (**dockerd**). The second line shows the `ps` command you just ran. The first column of the first line shows that the Docker daemon is running as **root**.
@@ -48,12 +47,11 @@ You must perform this step while logged in as the **ubuntu** user.
4847
ubuntu@node:~$ sudo docker run --rm alpine id
4948
5049
Unable to find image 'alpine:latest' locally
51-
latest: Pulling from library/alpine
52-
e110a4a17941: Pull complete
53-
Digest: sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
54-
Status: Downloaded newer image for alpine:latest
55-
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
56-
50+
latest: Pulling from library/alpine
51+
e110a4a17941: Pull complete
52+
Digest: sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
53+
Status: Downloaded newer image for alpine:latest
54+
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
5755
```
5856

5957
The last line of the output above shows that the container is running as root - `uid=0(root)` and `gid=0(root)`.
@@ -186,7 +184,6 @@ In this step you'll see how to implement user namespaces.
186184
187185
rm: remove 'sh'? y
188186
rm: can't remove 'sh': Permission denied
189-
190187
```
191188

192189
The operation fails with a permission denied error. This is because the file you are trying to delete exists in the local filesystem of the Docker Host and the container does not have root access outside of the namespace that it exists in.

0 commit comments

Comments
 (0)