How do you specify a command to be executed when a Docker container starts using a Dockerfile?
ENV
RUN
CMD
ENTRYPOINT
What is the core functionality of Docker?
Managing virtual machines
Automating software deployments
Compiling code into executable programs
Building and running applications in isolated environments
What is the purpose of the 'ports:' section in a Docker Compose service definition?
Mount volumes from the host machine to the container
Specify the network to which the service connects
Map ports from the container to the host machine
Define environment variables for the service
What is the function of the Docker Client?
It manages the Docker daemon on a remote host
It provides a user interface for interacting with the Docker daemon
It stores and distributes Docker images
It defines the application and its dependencies in a Dockerfile
What is the primary purpose of Docker Compose?
Storing Docker images in a central repository
Building individual Docker images
Deploying Docker containers to production servers
Defining and managing multi-container Docker applications
What does the '-t' flag do when used with the 'docker build' command?
Specifies the Dockerfile to use
Sets a tag for the built image
Defines the target platform for the image
Enables verbose output during the build process
When should you consider using the 'host' network mode for a Docker container?
When you want to connect the container to a specific VLAN on the host
When you need to expose multiple ports from the container
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
Where can you find pre-built Docker images for common software?
Microsoft Azure Blob Storage
Amazon S3
Docker Hub
GitHub repositories
You want a container to have NO network access at all. Which Docker networking mode should you use?
Host
Isolate
Bridge
None
What is the key difference between Docker and a virtual machine?
Docker provides a graphical user interface, while VMs do not
Docker is used for hardware virtualization, while VMs are used for software virtualization
Docker containers share the host OS kernel, while VMs have their own kernel
Docker is primarily used for development, while VMs are used for production