What is the default network type used by Docker when creating a new container?
Overlay
Host
Bridge
None
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 --name my-app-container my-app-image
docker run -it my-app-image -n my-app-container
docker run -d my-app-container my-app-image
docker run my-app-image my-app-container
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 of the following is NOT a benefit of using Docker?
Improved security through isolation
Faster deployment times
Increased resource utilization
Increased application size
What is the purpose of the 'ports:' section in a Docker Compose service definition?
Define environment variables for the service
Specify the network to which the service connects
Map ports from the container to the host machine
Mount volumes from the host machine to the container
You want to see a list of all running containers. Which command do you use?
docker images
docker exec
docker ps
docker run
Which Dockerfile instruction is used to define the base image for a new Docker image?
COPY
WORKDIR
RUN
FROM
What port does the Docker daemon typically listen on?
80
8080
443
2377
To gracefully stop a running container, which command is recommended?
docker kill
docker down
docker halt
docker stop
What does the Docker Engine comprise of?
Docker Daemon and Docker Registry
Docker Client, Docker Daemon, Docker Images
Docker Client and Docker Server
Docker Client, Docker Daemon, and Docker Registry