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. 1. Which of the following best describes health check in Docker?

    • A. Text file with instructions to build an image.
    • B. Probe that reports whether a containerized service is ready.correct
    • C. Lists running containers.
    • D. Persistent storage mounted into a container.

    Why: health check: Probe that reports whether a containerized service is ready.

  2. 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. 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. 4. In Docker, what does docker run do or refer to?

    • A. Text file with instructions to build an image.
    • B. Persistent storage mounted into a container.
    • C. Starts all services defined in the compose file.
    • D. Command that creates and starts a container from an image.correct

    Why: docker run: Command that creates and starts a container from an image.

  5. 5. 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.

  6. 6. What is the purpose of docker-compose up in Docker?

    • A. Label identifying an image version, e.g., node:20.
    • B. Starts all services defined in the compose file.correct
    • C. Probe that reports whether a containerized service is ready.
    • D. Persistent storage mounted into a container.

    Why: docker-compose up: Starts all services defined in the compose file.

  7. 7. In Docker, what does ENTRYPOINT do or refer to?

    • A. Instruction defining the container's main executable.correct
    • B. Command that creates and starts a container from an image.
    • 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.

  8. 8. 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.

  9. 9. Which of the following best describes docker run in Docker?

    • A. Starts all services defined in the compose file.
    • B. Command that creates and starts a container from an image.correct
    • C. Instruction defining the container's main executable.
    • D. Probe that reports whether a containerized service is ready.

    Why: docker run: Command that creates and starts a container from an image.

  10. 10. In Docker, what does health check do or refer to?

    • A. Text file with instructions to build an image.
    • B. Probe that reports whether a containerized service is ready.correct
    • C. Lists running containers.
    • D. Persistent storage mounted into a container.

    Why: health check: Probe that reports whether a containerized service is ready.

  11. 11. In Docker, what does image tag do or refer to?

    • A. Persistent storage mounted into a container.
    • B. Instruction defining the container's main executable.
    • C. Starts all services defined in the compose file.
    • D. Label identifying an image version, e.g., node:20.correct

    Why: image tag: Label identifying an image version, e.g., node:20.

  12. 12. 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.

  13. 13. 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.

  14. 14. What is the purpose of image tag in Docker?

    • A. Label identifying an image version, e.g., node:20.correct
    • B. Text file with instructions to build an image.
    • C. Lists running containers.
    • D. Instruction defining the container's main executable.

    Why: image tag: Label identifying an image version, e.g., node:20.

  15. 15. What is the purpose of ENTRYPOINT in Docker?

    • A. Instruction defining the container's main executable.correct
    • B. Text file with instructions to build an image.
    • C. Persistent storage mounted into a container.
    • D. Probe that reports whether a containerized service is ready.

    Why: ENTRYPOINT: Instruction defining the container's main executable.

  16. 16. What is the purpose of health check in Docker?

    • A. Probe that reports whether a containerized service is ready.correct
    • B. Persistent storage mounted into a container.
    • C. Label identifying an image version, e.g., node:20.
    • D. Text file with instructions to build an image.

    Why: health check: Probe that reports whether a containerized service is ready.

  17. 17. 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.

  18. 18. Which of the following best describes Dockerfile in Docker?

    • A. Text file with instructions to build an image.correct
    • B. Label identifying an image version, e.g., node:20.
    • C. Persistent storage mounted into a container.
    • D. Probe that reports whether a containerized service is ready.

    Why: Dockerfile: Text file with instructions to build an image.

  19. 19. What is the purpose of Dockerfile in Docker?

    • A. Persistent storage mounted into a container.
    • B. Text file with instructions to build an image.correct
    • C. Probe that reports whether a containerized service is ready.
    • D. Starts all services defined in the compose file.

    Why: Dockerfile: Text file with instructions to build an image.

  20. 20. Which of the following best describes volume in Docker?

    • A. Command that creates and starts a container from an image.
    • B. Instruction defining the container's main executable.
    • C. Persistent storage mounted into a container.correct
    • D. Lists running containers.

    Why: volume: Persistent storage mounted into a container.

Related Automation Testing topics