Which Docker Compose command is used to start services in the background?
docker-compose up
docker-compose start
docker-compose up -d
docker-compose run
What is the primary purpose of Docker containers in software development?
To create virtual machines.
To manage network infrastructure.
To package and isolate applications with their dependencies.
To compile code faster.
What command initiates the building of a Docker image from a Dockerfile?
docker build
docker make
docker create
docker compile
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
Improved performance by using a faster networking protocol
Increased security by isolating containers on different networks
Simplified management by automatically connecting all containers to a single network
You want a container to have NO network access at all. Which Docker networking mode should you use?
Host
Bridge
Isolate
None
Which command will start a new container from an image?
docker run
docker start
docker exec
What is the purpose of the 'ports:' section in a Docker Compose service definition?
Specify the network to which the service connects
Mount volumes from the host machine to the container
Define environment variables for the service
Map ports from the container to the host machine
Which component of Docker's architecture is responsible for building and storing Docker images?
Docker Registry
Docker Host
Docker Container
Docker Client
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 need to run a network monitoring tool inside the container
When you want to limit the container's network access for security reasons
How do Docker containers differ from virtual machines?
Containers share the host kernel, while VMs have their own.
Containers require more resources than VMs.
Containers cannot run on the cloud.
Containers are used only for development, while VMs are for production.