Skip to content

Namespaces: what a container can see

Select an icon to see what it is.

Step 4 of 6

mnt and uts: its own files and hostname

The mount namespace gives the container its own mount table, with the overlay filesystem as its root. The uts namespace gives it its own hostname, which defaults to the first 12 characters of the container Id. Changing either inside the container does not touch the host.

$ docker exec web hostname

Inside the container

/proc/self/mountinfo: / is an overlay mount
hostname: <first 12 characters of the container Id>