Intern
What is the difference between a Docker image and a container? An image can be freely modified after launch, while a running container remains static and immutable. An image is an archive of the application's source code, while a container is a pre-built executable environment without code. An image resides in memory during operation, while a container is stored in a registry as layers. An image is an immutable template with a filesystem and metadata, while a container is an isolated process launched from an image with its own state.
sobes.tech AI
Answer from AI
A Docker image is an immutable template containing a filesystem, dependencies, and metadata necessary to run an application. It is stored as layers and serves as the basis for creating containers.
A container is a running instance of an image, an isolated process with its own state and filesystem, which can change during operation. Containers are created from images and can be started, stopped, modified, and removed.
Therefore, the correct answer:
An image is an immutable template with a filesystem and metadata, a container is a running, isolated process from an image with its own state.