Docker image VS Docker container

👋 Say Hi.. to me on Twitter

Imran Ahmad
2 min readMay 20, 2021

What is the difference between docker image and docker container?

Long story short…

Docker Images:

The file system and configuration(read-only) application which is used to create containers.

Docker Containers:

The major difference between a container and an image is the top writable layer. Containers are running instances of Docker images with top writable layer. Containers run the actual applications. A container includes an application and all of its dependencies. When the container is deleted, the writable layer is also deleted. The underlying image remains unchanged.

Other important terms to notice:

Docker daemon -

The background service running on the host that manages the building, running and distributing Docker containers.

Docker client -

The command line tool that allows the user to interact with the Docker daemon.

Docker Store -

Store is, among other things, a registry of Docker images. You can think of the registry as a directory of all available Docker images

A picture from this blog post is worth a thousand words.

Summary:

  • Pull image from Docker hub or build from a Dockerfile => Gives a Docker image (not editable).
  • Run the image (docker run image_name:tag_name) => Gives a running Image i.e. container (editable)

Thanks for the quick read.
Show your love by clapping. Ah! you can clap 50 times, if you are not aware.

--

--

Imran Ahmad

Tech enthusiast, product visualiser nothing more or less.