What are Docker image “layers”?

后端 未结 9 1580
情话喂你
情话喂你 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 18:00

    Per Docker's image spec via The Moby Project:

    Images are composed of layers. Each layer is a set of filesystem changes. Layers do not have configuration metadata such as environment variables or default arguments - these are properties of the image as a whole rather than any particular layer.

    So, essentially, a layer is just a set of changes made to the filesystem.

提交回复
热议问题