0
0
Dockerdevops~10 mins

User namespace remapping in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to enable user namespace remapping in Docker daemon.

Docker
dockerd --userns-[1]
Drag options to blanks, or click blank then click option'
Auser
Benable
Cmap
Dremap
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enable' or 'map' instead of 'remap' causes the command to fail.
Omitting the flag entirely disables user namespace remapping.
2fill in blank
medium

Complete the daemon.json snippet to set user namespace remapping to the default user.

Docker
{
  "userns-remap": "[1]"
}
Drag options to blanks, or click blank then click option'
Aroot
Bdefault
Cnobody
Duser
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'root' disables remapping.
Using 'nobody' is not a valid remapping user.
3fill in blank
hard

Fix the error in this Docker run command to use user namespace remapping correctly.

Docker
docker run --userns [1] alpine id
Drag options to blanks, or click blank then click option'
Aremap
Bmap
Cdefault
Duserns-remap
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'remap' causes an unknown mode error.
Using 'userns-remap' is invalid for this flag.
4fill in blank
hard

Fill both blanks to create a user namespace remapping entry in /etc/subuid and /etc/subgid.

Docker
dockremap:[1]:[2]
Drag options to blanks, or click blank then click option'
A100000
B65536
C65535
D100001
Attempts:
3 left
💡 Hint
Common Mistakes
Using 65535 instead of 65536 causes off-by-one errors.
Using 100001 as start UID is incorrect for default remapping.
5fill in blank
hard

Fill all three blanks to complete the Docker daemon configuration for user namespace remapping with a custom user.

Docker
{
  "userns-remap": "[1]",
  "subuid": "[2]",
  "subgid": "[3]"
}
Drag options to blanks, or click blank then click option'
Acustomuser
B100000-165535
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' as user disables custom remapping.
Mismatching UID and GID ranges causes errors.