What is the primary benefit of using a user-defined bridge network over the default bridge network in Docker?
Improved performance by using a faster networking protocol
Increased security by isolating containers on different networks
Reduced resource consumption by sharing network resources
Simplified management by automatically connecting all containers to a single network
What does the COPY instruction do in a Dockerfile?
COPY
Sets the working directory for subsequent instructions.
Copies files or directories from the host machine to the image.
Exposes a port from the container to the host.
Executes a command within the Docker image.
What is the primary purpose of Docker containers in software development?
To package and isolate applications with their dependencies.
To manage network infrastructure.
To compile code faster.
To create virtual machines.
What does the '-t' flag do when used with the 'docker build' command?
Defines the target platform for the image
Enables verbose output during the build process
Specifies the Dockerfile to use
Sets a tag for the built image
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 need to run a network monitoring tool inside 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
What is the purpose of Dockerfile in Docker?
To define the steps for building a Docker image
To run a Docker container
To manage Docker networks
To store container logs
You want to see a list of all running containers. Which command do you use?
docker run
docker images
docker ps
docker exec
Where can you find pre-built Docker images for common software?
Docker Hub
GitHub repositories
Microsoft Azure Blob Storage
Amazon S3
Which Docker network driver allows a container to share the host's network stack, effectively making it appear as if the container's processes are running directly on the host?
Host
Bridge
Overlay
Macvlan
What does the '-d' flag do when running a Docker container?
Runs the container in detached mode (background).
Displays the container's logs in the terminal.
Deletes the container after it stops.
Downloads the latest image from the repository.