Docker: Containerization Fundamentals

20 QuestionsIntermediatePublished:

Docker: Containerization Fundamentals

Up to 20 questions, shuffled on every run

Quiz Configuration
Enterto start

Welcome to the Docker Basics Quiz! This quiz covers fundamental Docker concepts, containerization, and best practices. Each question is multiple-choice, and you’ll find hints to help you along the way. Good luck!

Answer key and explanations20 questions

The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.

  1. Which Dockerfile instruction specifies the base image for a new container?

    Answer`FROM`

  2. Which command is used to build an image from a Dockerfile?

    Answer`docker build`

  3. What is the primary difference between CMD and ENTRYPOINT?

    Answer`ENTRYPOINT` sets the executable; `CMD` sets default arguments

  4. Which command displays the list of currently running containers?

    Answer`docker ps`

  5. What does the -d flag do when running a container?

    AnswerStarts the container in detached background mode

  6. Which instruction allows you to set environmental variables within a Dockerfile?

    Answer`ENV`

  7. What is a Docker "Layer"?

    AnswerA read-only filesystem change from a command

  8. How do you stop all running Docker containers at once?

    Answer`docker stop $(docker ps -q)`

  9. Which Docker network driver is the default for standalone containers?

    Answer`Bridge`

  10. What is the purpose of a Docker ".dockerignore" file?

    AnswerExcludes local files from being sent to the build context

  11. Which command allows you to enter a running container and start a shell?

    Answer`docker exec -it <id> /bin/bash`

  12. What is the command to delete a specific Docker image?

    Answer`docker rmi`

  13. What is a "Volume" in Docker?

    AnswerA persistent storage area managed by Docker

  14. In "docker run -p 8080:80 nginx", which port is the host port?

    Answer8080

  15. Which instruction defines the directory where subsequent commands will be executed?

    Answer`WORKDIR`

  16. What is "Multi-stage building"?

    AnswerUsing separate stages to reduce final image size

  17. Which command is used to see the metadata (IP, Config, etc.) of a container?

    Answer`docker inspect`

  18. What is the purpose of "Docker Hub"?

    AnswerA public registry for sharing container images

  19. What is "Copy-on-Write" (CoW)?

    AnswerA strategy that copies files only when modified

  20. Which command pulls an image from a registry without running it?

    Answer`docker pull`

  21. What does "docker system prune" do?

    AnswerRemoves unused data like stopped containers

  22. Which Dockerfile instruction is used to document intended ports?

    Answer`EXPOSE`

  23. What is a "Dangling Image"?

    AnswerAn image that has no name tag or reference

  24. Which command starts a previously stopped container?

    Answer`docker start`

  25. What is the default user in most Docker images if not specified?

    Answer`root`

  26. Which command logs you into a Docker registry?

    Answer`docker login`

  27. What is Docker Compose used for?

    AnswerRunning multi-container apps using YAML files

  28. Which flag is used to name a container during "docker run"?

    Answer--name

  29. What is the purpose of the "HEALTHCHECK" instruction?

    AnswerTo check if the application inside is functional

  30. What command shows the history of an image?

    Answer`docker history`

Was this useful?

You might also enjoy

Check out some of our other posts on similar topics

Kubernetes: Container Orchestration Essentials

Kubernetes: Container Orchestration Essentials

Welcome to the Kubernetes Basics Quiz! This quiz covers fundamental Kubernetes concepts, container orchestration, and cloud-native application deployment best practices. Each question is multiple-choi

Helm: Kubernetes Package Management Essentials

Helm: Kubernetes Package Management Essentials

Welcome to the Helm Basics Quiz! Helm is the "Package Manager for Kubernetes," and understanding it is essential for any modern DevOps engineer. This quiz will test your knowledge of how charts are st

Kubernetes Advanced: Production Operations & Scaling

Kubernetes Advanced: Production Operations & Scaling

Welcome to the Kubernetes Advanced Quiz! This quiz is designed to test your knowledge of Kubernetes concepts related to production operations and scaling. Each question will challenge your understandi

Istio: Service Mesh Fundamentals

Istio: Service Mesh Fundamentals

Welcome to the Istio Basics Quiz! Istio is often the "final boss" of Kubernetes infrastructure. It adds a layer of intelligence and security that is critical for managing production-grade microservice

Linux: System Administration Fundamentals

Linux: System Administration Fundamentals

Welcome to the Linux Basics Quiz! This quiz covers fundamental Linux concepts, commands, and system administration best practices. Each question is multiple-choice, and you'll find hints to help you a

AWS: Cloud Services & Architecture Fundamentals

AWS: Cloud Services & Architecture Fundamentals

Welcome to the AWS Basics Quiz! This quiz covers fundamental AWS concepts and best practices. Each question is multiple-choice, and you'll find hints to help you along the way. Good luck!

6 related posts