Which command is used to download a Docker image from a registry?
docker run
docker push
docker build
docker pull
Which Dockerfile instruction is used to define the base image for a new Docker image?
WORKDIR
COPY
FROM
RUN
You've pulled an image named 'my-app-image'. How would you start a container from this image and give it the name 'my-app-container'?
docker run my-app-image my-app-container
docker run -it my-app-image -n my-app-container
docker run -d my-app-container my-app-image
docker run --name my-app-container my-app-image
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?
Bridge
Macvlan
Overlay
Host
What's the purpose of the -d flag when running a Docker container?
-d
Delete the container automatically after it exits.
Disable networking for the container.
Run the container in detached mode (background).
Display detailed logs from the container.
What is the default network type used by Docker when creating a new container?
None
What command initiates the building of a Docker image from a Dockerfile?
docker compile
docker create
docker make
What port does the Docker daemon typically listen on?
80
8080
2377
443
What is the function of the Docker Client?
It provides a user interface for interacting with the Docker daemon
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
You want to see a list of all running containers. Which command do you use?
docker images
docker exec
docker ps