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?

Thanks.

Sep 4, 2018 in Docker by shubham
• 6,870 points
396 views

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,490 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,900 points
215 views
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
• 37,320 points
301 views
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,160 points
98 views
0 votes
1 answer

How do I run a docker image as a container?

You can run an image depends on whether you ...READ MORE

answered Sep 7, 2018 in Docker by Damon Salvatore
• 5,490 points
54 views
0 votes
1 answer