What is the purpose of volume drivers in Docker?
To enable the use of remote storage or cloud-based solutions for volumes.
To manage the lifecycle of bind mounts.
To restrict container access to specific volumes.
To improve the performance of volume operations.
Which of the following is NOT a valid health check type in a Dockerfile?
TCP
CMD
NONE
HTTP
You want to execute 'ls -l' inside a container named 'app-server' and allocate a pseudo-TTY. Which command is correct?
docker exec app-server -it ls -l
docker run -it app-server ls -l
docker exec -d app-server ls -l
docker exec -it app-server ls -l
What is the primary function of a Docker Registry?
Running Docker containers in production
Building Docker images
Storing and distributing Docker images
Managing network traffic between containers
What is the purpose of a replica in the context of Docker Swarm services?
A copy of a Docker image stored on a different node
A load balancer that distributes traffic across multiple containers
An instance of a container running a specific task for a service
A backup of a manager node to ensure high availability
You've scaled a service in Docker Compose, but now want to revert to a single instance. How do you achieve this?
Use docker-compose down followed by docker-compose up
docker-compose down
docker-compose up
Execute docker-compose restart <service_name>
docker-compose restart <service_name>
Docker Compose automatically handles this, no manual intervention needed
Utilize docker-compose scale <service_name>=1
docker-compose scale <service_name>=1
What is a key benefit of using a private Docker Registry in a continuous integration/continuous deployment (CI/CD) pipeline?
It enables faster and more controlled image distribution within the pipeline.
It simplifies the process of building images from source code.
It eliminates the need for image version control.
It allows for easier public image discovery.
What is the purpose of a Swarm service's 'update_config' setting?
To automatically update the service's Docker image to the latest version
To change the environment variables for the service's containers
To configure how updates to the service are rolled out across replicas
To scale the number of replicas for the service up or down
How do you stop a running Docker container named 'mycontainer'?
docker kill mycontainer
docker stop mycontainer
docker halt mycontainer
docker down mycontainer
When choosing a data persistence strategy in Docker, which factor should be considered carefully?
The color scheme of the Docker logo.
The sensitivity and importance of the data being stored.
The version of Docker being used.
The number of containers running on the host.