11.) How do you name a container when running it?
A) Using the -t flag
B) By renaming the Dockerfile
C) Using the –id flag
D) Using the –name flag
12.) How do you inspect detailed information about a container?
A) docker inspect <container-id>
B) docker logs <container-id>
C) docker history <container-id>
D) docker ps –detail
13.) What is the purpose of container ports in Docker?
A) To provide persistent storage
B) To enable network communication between the container and host
C) To run multiple containers in parallel
D) To debug the container
14.) Which command removes all stopped containers?
A) docker rm all
B) docker container prune
C) docker clean
D) docker rm –all
15.) How do you limit CPU usage for a container?
A) –limit-cpu
B) –cpu-share
C) –cpus
D) –cpu-limit
16.) How do you limit memory usage for a container?
A) –memory
B) –mem-limit
C) –limit-mem
D) –ram
17.) What happens if you try to remove a running container?
A) The container is forcefully stopped and removed.
B) Docker throws an error.
C) The container is removed without stopping it.
D) Docker archives the container.
18.) How do you forcefully remove a running container?
A) docker rm -f <container-id>
B) docker stop <container-id>
C) docker terminate <container-id>
D) docker remove –force <container-id>
19.) Which command displays container resource usage statistics?
A) docker logs
B) docker monitor
C) docker inspect
D) docker stats
20.) How do you pause a running container?
A) docker pause <container-id>
B) docker stop <container-id>
C) docker hold <container-id>
D) docker freeze <container-id>
Related