21.) What is the purpose of the context key in the docker-compose.yml file?
A) To define environment variables
B) To specify container dependencies
C) To set the working directory of the container
D) To specify the build location for the Dockerfile
22.) Which command is used to pause all running containers in Docker Compose?
A) docker-compose stop
B) docker-compose pause
C) docker-compose suspend
D) docker-compose hold
23.) What is the service key used for in a docker-compose.yml file?
A) To specify individual services in the Compose setup
B) To define container networking
C) To configure environment variables
D) To link containers
24.) How do you update a running container’s configuration in Docker Compose?
A) Restart the container
B) Rebuild the container and restart using docker-compose up –build
C) Use the docker-compose update command
D) Edit the container configuration manually
25.) Which of the following is NOT an advantage of Docker Compose?
A) Simplifies multi-container setup
B) Allows easy scaling of services
C) Provides built-in monitoring and alerting
D) Manages container dependencies automatically
Related