Cloud & DevOps · Question 7 · Medium
In Docker, what is the relationship between an image and a container?
- An image is a read-only template, and a container is a running (or stopped) instance created from that image
- A container is a template, and an image is a running instance
- Images and containers are the same thing
- 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
- How do containers differ from virtual machines?
- What does Continuous Integration (CI) mean in DevOps?
- After running chmod 754 report.sh, what are the permissions of report.sh?
- Which command shows the last 20 lines of the file app.log?
- Adding two more identical application servers behind a load balancer to handle…
- In Kubernetes, what is a Pod?
- What is the difference between Continuous Delivery and Continuous Deployment?
- What does this shell pipeline print? Ignore any leading spaces.
- The file server.log contains these four lines: ERROR disk full INFO ok ERROR…
- In a Dockerfile for a Node.js app, why are package.json and package-lock.json…
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