What does the '-d' flag do when running a Docker container?
Deletes the container after it stops.
Downloads the latest image from the repository.
Displays the container's logs in the terminal.
Runs the container in detached mode (background).
What is the function of the Docker Client?
It stores and distributes Docker images
It manages the Docker daemon on a remote host
It defines the application and its dependencies in a Dockerfile
It provides a user interface for interacting with the Docker daemon
Which Dockerfile instruction is used to define the base image for a new Docker image?
WORKDIR
COPY
RUN
FROM
To gracefully stop a running container, which command is recommended?
docker kill
docker stop
docker halt
docker down
What is the role of the Docker Client in the Docker architecture?
It provides a user interface for interacting with the Docker Daemon.
It stores and distributes Docker images.
It builds and runs the Docker containers.
It manages the Docker images and containers.
How do you specify a command to be executed when a Docker container starts using a Dockerfile?
ENTRYPOINT
ENV
CMD
In Docker's default bridge network, how do containers get assigned IP addresses?
Dynamically from the Docker host's DHCP server
Randomly generated at container startup
Dynamically from the bridge network's built-in DHCP server
Statically from a configuration file
What is the purpose of Dockerfile in Docker?
To store container logs
To define the steps for building a Docker image
To run a Docker container
To manage Docker networks
Which command completely removes a Docker container?
docker rm <container_id>
docker delete <container_id>
docker stop -r <container_id>
docker kill <container_id>
What does the COPY instruction do in a Dockerfile?
Sets the working directory for subsequent instructions.
Executes a command within the Docker image.
Exposes a port from the container to the host.
Copies files or directories from the host machine to the image.