Docker for Testing interview questions — Easy
99 easy-level Docker for Testing questions from our Automation Testing bank, each with the correct answer and an explanation of why it is correct.
This topic slice is available to practise but is not yet part of our indexed set.
What this covers
Docker for Testing appears throughout Automation Testing interviews. At easy level, interviewers are typically checking that you know the fundamentals and can describe them precisely — definitions, defaults, and the basic mechanics. Work through these, then explain your answer out loud; the second part is what interviews actually test.
20 example questions
1. Which of the following best describes health check in Docker?
- A. Instruction defining the container's main executable.
- B. Lists running containers.
- C. Probe that reports whether a containerized service is ready.correct
- D. Persistent storage mounted into a container.
Why: health check: Probe that reports whether a containerized service is ready.
2. Which of the following best describes docker-compose up in Docker?
- A. Starts all services defined in the compose file.correct
- B. Lists running containers.
- C. Command that creates and starts a container from an image.
- D. Instruction defining the container's main executable.
Why: docker-compose up: Starts all services defined in the compose file.
3. In the context of Docker, docker-compose up is best described as:
- A. Label identifying an image version, e.g., node:20.
- B. Probe that reports whether a containerized service is ready.
- C. Starts all services defined in the compose file.correct
- D. Instruction defining the container's main executable.
Why: docker-compose up: Starts all services defined in the compose file.
4. Which of the following best describes ENTRYPOINT in Docker?
- A. Persistent storage mounted into a container.
- B. Instruction defining the container's main executable.correct
- C. Text file with instructions to build an image.
- D. Lists running containers.
Why: ENTRYPOINT: Instruction defining the container's main executable.
5. In Docker, what does docker-compose up do or refer to?
- A. Starts all services defined in the compose file.correct
- B. Label identifying an image version, e.g., node:20.
- C. Text file with instructions to build an image.
- D. Probe that reports whether a containerized service is ready.
Why: docker-compose up: Starts all services defined in the compose file.
6. What is the purpose of ENTRYPOINT in Docker?
- A. Persistent storage mounted into a container.
- B. Instruction defining the container's main executable.correct
- C. Probe that reports whether a containerized service is ready.
- D. Starts all services defined in the compose file.
Why: ENTRYPOINT: Instruction defining the container's main executable.
7. In Docker, what does image tag do or refer to?
- A. Lists running containers.
- B. Label identifying an image version, e.g., node:20.correct
- C. Probe that reports whether a containerized service is ready.
- D. Instruction defining the container's main executable.
Why: image tag: Label identifying an image version, e.g., node:20.
8. In Docker, what does docker run do or refer to?
- A. Command that creates and starts a container from an image.correct
- B. Probe that reports whether a containerized service is ready.
- C. Lists running containers.
- D. Persistent storage mounted into a container.
Why: docker run: Command that creates and starts a container from an image.
9. In Docker, what does ENTRYPOINT do or refer to?
- A. Text file with instructions to build an image.
- B. Instruction defining the container's main executable.correct
- C. Label identifying an image version, e.g., node:20.
- D. Starts all services defined in the compose file.
Why: ENTRYPOINT: Instruction defining the container's main executable.
10. What is the purpose of health check in Docker?
- A. Starts all services defined in the compose file.
- B. Persistent storage mounted into a container.
- C. Lists running containers.
- D. Probe that reports whether a containerized service is ready.correct
Why: health check: Probe that reports whether a containerized service is ready.
11. What is the purpose of docker-compose up in Docker?
- A. Command that creates and starts a container from an image.
- B. Persistent storage mounted into a container.
- C. Lists running containers.
- D. Starts all services defined in the compose file.correct
Why: docker-compose up: Starts all services defined in the compose file.
12. What is the purpose of image tag in Docker?
- A. Probe that reports whether a containerized service is ready.
- B. Label identifying an image version, e.g., node:20.correct
- C. Persistent storage mounted into a container.
- D. Instruction defining the container's main executable.
Why: image tag: Label identifying an image version, e.g., node:20.
13. In Docker, what does health check do or refer to?
- A. Persistent storage mounted into a container.
- B. Instruction defining the container's main executable.
- C. Probe that reports whether a containerized service is ready.correct
- D. Lists running containers.
Why: health check: Probe that reports whether a containerized service is ready.
14. What is the purpose of docker run in Docker?
- A. Probe that reports whether a containerized service is ready.
- B. Command that creates and starts a container from an image.correct
- C. Starts all services defined in the compose file.
- D. Label identifying an image version, e.g., node:20.
Why: docker run: Command that creates and starts a container from an image.
15. Which of the following best describes image tag in Docker?
- A. Probe that reports whether a containerized service is ready.
- B. Label identifying an image version, e.g., node:20.correct
- C. Persistent storage mounted into a container.
- D. Lists running containers.
Why: image tag: Label identifying an image version, e.g., node:20.
16. Which of the following best describes docker run in Docker?
- A. Probe that reports whether a containerized service is ready.
- B. Command that creates and starts a container from an image.correct
- C. Lists running containers.
- D. Persistent storage mounted into a container.
Why: docker run: Command that creates and starts a container from an image.
17. What is the purpose of docker ps in Docker?
- A. Label identifying an image version, e.g., node:20.
- B. Starts all services defined in the compose file.
- C. Probe that reports whether a containerized service is ready.
- D. Lists running containers.correct
Why: docker ps: Lists running containers.
18. Which of the following best describes docker ps in Docker?
- A. Label identifying an image version, e.g., node:20.
- B. Lists running containers.correct
- C. Instruction defining the container's main executable.
- D. Persistent storage mounted into a container.
Why: docker ps: Lists running containers.
19. In Docker, what does docker ps do or refer to?
- A. Starts all services defined in the compose file.
- B. Probe that reports whether a containerized service is ready.
- C. Text file with instructions to build an image.
- D. Lists running containers.correct
Why: docker ps: Lists running containers.
20. In Docker, what does Dockerfile do or refer to?
- A. Instruction defining the container's main executable.
- B. Probe that reports whether a containerized service is ready.
- C. Lists running containers.
- D. Text file with instructions to build an image.correct
Why: Dockerfile: Text file with instructions to build an image.