What is the difference between a Docker image and a container?

0 votes

I have an image for my PostgreSQL instance and an image for my web application, changes to which keep on being persisted.

What is a container and what is the difference between docker image and container?

Can anyone explain it to me?


Sep 4, 2018 in Docker by shubham
• 6,890 points

1 answer to this question.

+1 vote
Here is very basic explanation for image and container.

 An instance of an image is called a container. You have an image, which is a set of layers as you describe. If you start this image, you have a running container of this image. You can have many running containers of the same image.

You can see all your images with docker images whereas you can see your running containers with docker ps (and you can see all containers with docker ps -a).

So a running instance of an image is a container.

I hope the above explanation will be helpful for you.
answered Sep 4, 2018 by Damon Salvatore
• 5,510 points

Related Questions In Docker

0 votes
1 answer

What is the difference between “expose” and “publish” in Docker?

Basically, you have three options: Neither specify EXPOSE nor -p -> ...READ MORE

answered Jul 18, 2018 in Docker by Nilesh
• 6,880 points
0 votes
1 answer
0 votes
1 answer
+6 votes
3 answers

Difference between image and container - Containerization cencepts

Entire concept of docker and Kubernetes is ...READ MORE

answered Sep 12, 2018 in Docker by Kalgi
• 40,420 points
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,520 points
0 votes
2 answers

How do I run a docker image as a container?

You could probably follow these steps : $ docker ...READ MORE

answered Aug 9 in Docker by Sirajul
• 25,180 points
0 votes
1 answer