What is an image?
An image is a template, a "snapshot" of a future container. It stores everything needed to run an application: files, dependencies, configurations, library versions, build instructions.
Characteristics of an image:
- Immutable - an image cannot be changed "on the fly"; it can only be rebuilt.
- Layered - it consists of layers, which makes building and storage fast and economical.
- Container template - any number of containers can be started from one image.
- Portable - it works the same on any machine that has Docker.
In one line: an image is the template Docker uses to create a container.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.