Cloud & DevOps · Question 7 · Medium

In Docker, what is the relationship between an image and a container?

  1. An image is a read-only template, and a container is a running (or stopped) instance created from that image
  2. A container is a template, and an image is a running instance
  3. Images and containers are the same thing
  4. An image is a virtual machine, and a container is its disk
Answer and explanation

Answer: A. An image is a read-only template, and a container is a running (or stopped) instance created from that image

Explanation: An image is a layered, read-only template. docker run creates a container from it by adding a writable layer and starting a process. Many containers can come from one image.

Previous: After running chmod 754 report.sh, what are the permissions of report.sh? · Next: Which command shows the last 20 lines of the file app.log?

Practise cloud & devops

Try a fresh set of cloud & devops questions with an explanation after every answer, free and without signing up: Cloud & DevOps practice. Or sit a full placement mock test.

More cloud & devops questions

More technical & programming practice

GenAI Basics · Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms · Object-Oriented Programming

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge