0
0
Dockerdevops~20 mins

User namespace remapping in Docker - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
User Namespace Remapping Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of user namespace remapping in Docker?

User namespace remapping changes how user IDs inside a container map to user IDs on the host. What is the main reason Docker uses this feature?

ATo isolate container users from host users for better security
BTo improve container startup speed by caching user IDs
CTo allow containers to share the same user IDs as the host
DTo enable containers to run without any user permissions
Attempts:
2 left
💡 Hint

Think about how containers can be safer by separating their users from the host system users.

💻 Command Output
intermediate
2:00remaining
What is the output of 'docker info' regarding user namespace remapping when it is enabled?

After enabling user namespace remapping in Docker, you run docker info. What line indicates that user namespace remapping is active?

Docker
docker info
AUserns Mode: private
BUserns Mode: remapped
CUserns Mode: enabled
DUserns Mode: host
Attempts:
2 left
💡 Hint

Look for the exact phrase Docker uses to show remapping is active.

Configuration
advanced
2:00remaining
Which configuration snippet correctly enables user namespace remapping in Docker daemon.json?

You want to enable user namespace remapping by editing /etc/docker/daemon.json. Which snippet is correct?

A
{
  "userns-remap": "default"
}
B
{
  "userns_remap": "default"
}
C
{
  "userns-remap": true
}
D
{
  "user_namespace_remap": "default"
}
Attempts:
2 left
💡 Hint

Check the exact key name Docker expects in the JSON config.

Troubleshoot
advanced
2:00remaining
Why does Docker fail to start after enabling user namespace remapping with an invalid subuid range?

You enabled user namespace remapping but Docker daemon fails to start. You suspect the /etc/subuid and /etc/subgid files are misconfigured. What is the most likely cause?

AThe subuid and subgid ranges overlap with existing host user IDs
BThe Docker version does not support user namespace remapping
CThe Docker daemon.json file has a syntax error unrelated to userns
DThe subuid and subgid files are missing or empty for the remap user
Attempts:
2 left
💡 Hint

Check if the remap user has assigned subordinate IDs in the system files.

🔀 Workflow
expert
3:00remaining
What is the correct sequence to enable user namespace remapping and verify it works?

Arrange the steps in the correct order to enable user namespace remapping on a Docker host and confirm it is active.

A3,2,1,4
B1,3,2,4
C3,1,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint

Think about verifying prerequisites before changing config, then restarting, then checking status.