What is the purpose of a Swarm service's 'update_config' setting?
To configure how updates to the service are rolled out across replicas
To automatically update the service's Docker image to the latest version
To scale the number of replicas for the service up or down
To change the environment variables for the service's containers
In a multi-stage Docker build, how can you refer to a specific stage by its index?
By using a numerical index starting from 0.
It's not possible to refer to stages by index.
By using the stage's name.
By using a numerical index starting from 1.
What is the primary advantage of using Docker containers in a CI/CD pipeline?
Enhanced environment consistency across development, testing, and production
Guaranteed execution on any operating system
Elimination of the need for version control
Reduced storage footprint for build artifacts
What information does the 'docker inspect' command provide?
Low-level information about a container, image, or network
The status (running/stopped) of a container
Real-time resource usage of a running container
A list of all environment variables in a container
Which statement accurately describes a drawback of using bind mounts for sensitive data?
Bind mounts provide enhanced security for storing sensitive data.
Bind mounts can expose parts of the host's filesystem to containers, potentially leading to security risks.
Bind mounts are less efficient than Docker volumes for handling large data volumes.
Bind mounts are not supported in the latest versions of Docker.
What is a key benefit of using a private Docker Registry in a continuous integration/continuous deployment (CI/CD) pipeline?
It simplifies the process of building images from source code.
It enables faster and more controlled image distribution within the pipeline.
It allows for easier public image discovery.
It eliminates the need for image version control.
How does Docker optimize build cache for the RUN instruction?
RUN
It caches the entire file system state after each RUN instruction.
It caches the result of each individual command within a RUN instruction.
It only caches the output of the RUN command if it has changed.
It does not cache the results of RUN instructions.
What is the purpose of volume drivers in Docker?
To manage the lifecycle of bind mounts.
To enable the use of remote storage or cloud-based solutions for volumes.
To restrict container access to specific volumes.
To improve the performance of volume operations.
You want to execute 'ls -l' inside a container named 'app-server' and allocate a pseudo-TTY. Which command is correct?
docker run -it app-server ls -l
docker exec app-server -it ls -l
docker exec -it app-server ls -l
docker exec -d app-server ls -l
Which command is used to list all running Docker containers?
docker run
docker start
docker ps
docker images