- Layers represent filesystem differences
- The Docker storage driver is responsible for stacking these layers and providing a single unified view.
- Each instruction in the Dockerfile creates a new layer. Note: only non-zero layers and layers that do not already exist on the system are downloaded with the docker run command.
- When an image is changed, the new copy of the image stores only the changed layer(s). The new image (e.g. changed-ubuntu below) has layers that are simply pointers to the original image files' layers.
|Docker images are read-only templates from which Docker containers are instantiated. Each image consists of a series of layers. Docker uses a union file system to combine these layers to form a runnable file, referred to as a Docker image. Layers are discrete entities, promoting modularity and reuse of resources. Each layer results from an instruction in the Dockerfile.|
Note: There is no FROM instruction listed, it's likely that the FROM instruction is transformed into ADD file: 89ec.. as they both would pull in the base image.
|ADD file: 89ecb642d662ee7edbb868340551106d51336c7e589fdaca4111725ec64da957 in /
MAINTAINER NGINX Docker Maintainers "email@example.com"
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF…
RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 443/tcp 80/tcp
CMD ["nginx" "-g" "daemon off;"]