Psychz - Ramesh
Votes: 0Posted On: Oct 27, 2017 12:13:01
Images and Containers are often used interchangeably. However, they are not the same and functions differently.
Let me explain you both with simplest of example
A docker image is like an application which has an executable file on disk. They are never running.
On the other hand, When you execute an application, it creates an instance in memory that is running. This is like a Docker container.
Okay, let me put it in more simpler words,
A docker image contains an operating system along with many applications. Whereas, a container is running an instance generated from an image.
So now each time you start a container from an image, you are actually “starting over”. Which means that changes made to a container do not carry over to the base image. However, changes made within a container are saved since they are captured in that specific container’s filesystem layer.