In Docker, what's the difference between a con

2019-01-08 02:49发布

What's the difference between a container and an image in Docker? In the Get started with Docker tutorial these terms are both used, but I do not understand the difference.

Can anybody please shed some light?

13条回答
一纸荒年 Trace。
2楼-- · 2019-01-08 03:37

Docker Images: It contains a list of commands and instruction on how to build and run a container. So basically Images contains all the data and metadata required to fire up a container(also called blueprint).We can't lunch a container without specifying Images.

$docker images centos

List all the available version of centos.

Docker Container: Containers are lunch from Images so we can say container is the running instance of an Images. Container is a runtime construct, unlike Images which is build time construct.

查看更多
登录 后发表回答