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
What is the primary purpose of Docker?
To manage hardware resources efficiently
To automate software testing processes
To package and run applications in isolated environments
To provide a platform for running virtual machines
Which component of Docker's architecture is responsible for building and storing Docker images?
Docker Container
Docker Registry
Docker Host
Docker Client
What does the '-d' flag do when running a Docker container?
Downloads the latest image from the repository.
Runs the container in detached mode (background).
Deletes the container after it stops.
Displays the container's logs in the terminal.
Which Dockerfile instruction is used to define the base image for a new Docker image?
FROM
RUN
WORKDIR
COPY
What is the primary purpose of Docker Compose?
Deploying Docker containers to production servers
Building individual Docker images
Storing Docker images in a central repository
Defining and managing multi-container Docker applications
What is a potential drawback of using the 'host' network mode in Docker?
Limited network performance due to sharing the host's network bandwidth
Reduced security as the container can access all ports and resources on the host
Increased network overhead due to network address translation (NAT)
Increased complexity in configuring network settings for the container
What happens to data within a container when it is removed using 'docker rm'?
Data is automatically backed up.
Data is migrated to a temporary location.
Data is deleted unless persisted using volumes.
Data is preserved in the image.
What is the function of the Docker Client?
It defines the application and its dependencies in a Dockerfile
It manages the Docker daemon on a remote host
It stores and distributes Docker images
It provides a user interface for interacting with the Docker daemon
What does the '-t' flag do when used with the 'docker build' command?
Specifies the Dockerfile to use
Enables verbose output during the build process
Defines the target platform for the image
Sets a tag for the built image