What are Docker image “layers”?

后端 未结 9 1599
情话喂你
情话喂你 2020-11-30 17:02

I am brand new to Docker and am trying to understand exactly what a Docker image is. Every single definition of a Docker image uses the term \"layer\", but does not

9条回答
  •  没有蜡笔的小新
    2020-11-30 17:49

    Thank you @David Castillo for the useful information. I think the layer is some binary change or instruction of a image that can be done or undone easily. They are done step by step that is same as a layer on a layer, so we called "layer".

    For more information you can see the "docker history" like this:

    docker images --tree
    Warning: '--tree' is deprecated, it will be removed soon. See usage.
    └─511136ea3c5a Virtual Size: 0 B Tags: scratch:latest
      └─59e359cb35ef Virtual Size: 85.18 MB
        └─e8d37d9e3476 Virtual Size: 85.18 MB Tags: debian:wheezy
          └─c58b36b8f285 Virtual Size: 85.18 MB
            └─90ea6e05b074 Virtual Size: 118.6 MB
              └─5dc74cffc471 Virtual Size: 118.6 MB Tags: vim:latest
    
    

提交回复
热议问题