How can you view the logs of a specific container named 'webserver'?
docker logs webserver
docker inspect webserver | grep logs
docker show-logs webserver
docker logs -id webserver
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 scale the number of replicas for the service up or down
To configure how updates to the service are rolled out across replicas
What is the role of authentication tokens in the context of a Docker Registry?
They provide temporary access credentials for interacting with the registry.
They are used to encrypt images stored in the registry.
They define the network routes for communication between the registry and clients.
They are used to digitally sign images to ensure their integrity.
What is the primary way to define and deploy applications in a Docker Swarm?
Kubernetes Deployments
Docker Compose files
Docker Swarm stacks
Dockerfiles
What information does the 'docker inspect' command provide?
Low-level information about a container, image, or network
Real-time resource usage of a running container
A list of all environment variables in a container
The status (running/stopped) of a container
What is the primary advantage of using multi-stage builds in Docker?
To enable parallel execution of build steps.
To improve network performance during the build process.
To reduce the size of the final Docker image.
To simplify the process of building complex applications.
What is a key advantage of using Docker with Jenkins for deployments?
Docker enables immutable deployments, ensuring consistent application versions across environments
Docker eliminates the need for orchestration tools like Kubernetes
Docker handles database migrations as part of the deployment process
Docker automatically scales applications based on real-time traffic
In a multi-stage Docker build, how can you refer to a specific stage by its index?
By using the stage's name.
By using a numerical index starting from 0.
It's not possible to refer to stages by index.
By using a numerical index starting from 1.
In Docker Swarm, what is the function of the 'docker stack deploy' command?
To deploy a single container based on a Docker image
To deploy a complete application stack defined in a YAML file
To define a new service with specific configurations
To scale an existing service to a desired number of replicas
What role does a manager node play in a Docker Swarm cluster?
Manages cluster state, schedules tasks, and ensures service availability
Executes the actual application tasks within containers
Provides networking and load balancing for the cluster
Stores and distributes Docker images to worker nodes