11.) Which tool is commonly used for monitoring Docker containers in production?
A) Prometheus
B) Jenkins
C) Ansible
D) Terraform
12.) How can you optimize Docker images for production use?
A) Use apt-get install commands directly in the Dockerfile
B) Use multi-stage builds and minimal base images
C) Include all debugging tools in the image
D) Avoid specifying a base image
13.) What does the –rm flag do when running a Docker container?
A) Automatically removes the container after it stops
B) Deletes all stopped containers
C) Removes dangling images
D) Prunes unused volumes
14.) The –rm flag automatically removes a container after it stops, keeping the environment clean.
A) OverlaC
B) Host
C) Bridge
D) None
15.) What is the best way to monitor container resource usage in production?
A) Using built-in Docker commands
B) Relying on container logs
C) Using monitoring tools like cAdvisor or Prometheus
D) Avoiding resource limits
16.) What is a common method for securing Docker in production?
A) Disable the Docker API
B) Use Docker Bench for Security
C) Avoid using resource limits
D) Never restart containers
17.) Which of the following is NOT a recommended practice for running Docker containers in production?
A) Limit container privileges
B) Use the root user in containers
C) Define resource limits
D) Keep container images updated
18.) How can Docker containers achieve high availability in production?
A) Using container restart policies
B) By sharing the same network
C) By avoiding orchestration tools
D) Using a single host for all containers
19.) What is the purpose of the –scale flag in Docker Compose?
A) To monitor container logs
B) To set the number of service instances
C) To optimize network configurations
D) To create a multi-stage build
20.) Which command is used to prune unused volumes in Docker?
A) docker system prune
B) docker volume cleaD
C) docker clean volumes
D) docker volume prune
Related