In Docker Compose, what is the primary function of environment variables?
To pass dynamic configuration values to services at runtime
To configure the network settings for services
To specify the build context for a service's Dockerfile
To define the Docker image to be used for a service
What is the primary advantage of using multi-stage builds in Docker?
To reduce the size of the final Docker image.
To improve network performance during the build process.
To simplify the process of building complex applications.
To enable parallel execution of build steps.
What is the default networking mode in Docker Compose when no explicit network configuration is provided?
Bridge
Overlay
None
Host
What is the purpose of a replica in the context of Docker Swarm services?
A load balancer that distributes traffic across multiple containers
A backup of a manager node to ensure high availability
A copy of a Docker image stored on a different node
An instance of a container running a specific task for a service
Which command is used to list all running Docker containers?
docker start
docker images
docker run
docker ps
How does Docker Swarm achieve network communication between containers on different nodes?
By creating a single, shared network interface for all containers
By establishing secure tunnels between individual containers
By creating an overlay network that spans across all nodes in the cluster
By relying on the host operating system's networking capabilities
What is the role of a Docker registry in a CI/CD pipeline?
To monitor application performance in real-time
To define the steps of the continuous integration process
To execute automated tests within isolated containers
To store and manage Docker images
What information does the 'docker inspect' command provide?
A list of all environment variables in a container
The status (running/stopped) of a container
Low-level information about a container, image, or network
Real-time resource usage of a running container
How does Docker integrate with GitLab CI for automated testing?
Docker directly executes test suites within the GitLab CI/CD platform
GitLab CI can use Docker images to provide isolated environments for running tests
Docker replaces the need for a separate testing framework
GitLab CI automatically generates Dockerfiles based on project code
What is the primary advantage of using Docker containers in a CI/CD pipeline?
Reduced storage footprint for build artifacts
Guaranteed execution on any operating system
Enhanced environment consistency across development, testing, and production
Elimination of the need for version control