What is the primary purpose of Docker?
To manage hardware resources efficiently
To provide a platform for running virtual machines
To automate software testing processes
To package and run applications in isolated environments
How would you build or rebuild services without starting them in Docker Compose?
docker-compose build
docker-compose up --build
docker-compose create --build
docker-compose start --build
What is a Docker image?
A command-line tool for managing Docker containers
A repository for storing Docker containers
A running instance of a container
A template for creating Docker containers
What is the purpose of the 'ports:' section in a Docker Compose service definition?
Define environment variables for the service
Map ports from the container to the host machine
Mount volumes from the host machine to the container
Specify the network to which the service connects
You want a container to have NO network access at all. Which Docker networking mode should you use?
Bridge
None
Isolate
Host
When should you consider using the 'host' network mode for a Docker container?
When you need to expose multiple ports from the container
When you want to connect the container to a specific VLAN on the host
When you want to limit the container's network access for security reasons
When you need to run a network monitoring tool inside the container
How do you specify the Docker image to be used for a service in 'docker-compose.yml'?
image:
build:
from:
container:
What is the role of the Docker Client in the Docker architecture?
It stores and distributes Docker images.
It manages the Docker images and containers.
It builds and runs the Docker containers.
It provides a user interface for interacting with the Docker Daemon.
What is the primary benefit of using a user-defined bridge network over the default bridge network in Docker?
Reduced resource consumption by sharing network resources
Increased security by isolating containers on different networks
Simplified management by automatically connecting all containers to a single network
Improved performance by using a faster networking protocol
What port does the Docker daemon typically listen on?
80
2377
443
8080