MCQ Quiz Beginner Docker

Docker Basics MCQ

Test your Docker fundamentals with 30 multiple-choice questions covering images, containers, Dockerfile, networking, volumes, and Docker Compose.

30 Questions
Beginner Level
~35 min Est. Time
100% Free
June 28, 2026 30 questions
What is Docker?
What is the difference between a Docker image and a Docker container?
Which Dockerfile instruction sets the base image for subsequent instructions?
Which command is used to build a Docker image from a Dockerfile?
What does the EXPOSE instruction in a Dockerfile do?
Which command lists all running Docker containers?
What is the purpose of the .dockerignore file?
What is the difference between the COPY and ADD instructions in a Dockerfile?
What is the difference between ENTRYPOINT and CMD in a Dockerfile?
Which command runs a command inside a running container?
What does the -d flag do when running 'docker run -d nginx'?
What is a Docker volume?
What is the difference between a Docker named volume and a bind mount?
Which Docker network driver creates an isolated network on a single host and is the default for user-defined networks?
What does docker stop do differently from docker kill?
Which command removes all stopped containers, unused networks, dangling images, and build cache?
What is a multi-stage Docker build?
What is Docker Compose used for?
Which Docker Compose command starts all services defined in docker-compose.yml in detached mode?
What does the RUN instruction do in a Dockerfile?
How do you map port 8080 on the host to port 80 inside a container?
What does docker images show?
What is a dangling Docker image?
Which Dockerfile instruction sets environment variables that are available both during build and at container runtime?
What is the purpose of the WORKDIR instruction in a Dockerfile?
How do you view the logs of a container named 'webserver'?
What restart policy should you set to make a container always restart unless explicitly stopped?
What does 'docker inspect <container>' return?
What is a Docker registry?
Which instruction in a Dockerfile defines the user that the container runs as?
What is the correct way to set a HEALTHCHECK in a Dockerfile?
Key Takeaways
  • Understand the difference between Docker images and containers
  • Know the key Dockerfile instructions and when to use them
  • Understand Docker networking modes and volume types
  • Know how Docker Compose manages multi-container applications
  • Recognise Docker best practices for production workloads

Suggest More MCQ Questions

Know a question that should be in this quiz? Submit it and help the community!

Open Google Form