Layers in Docker images
While being able to run your application within a Docker container is, in of itself, a great feature, it is only in combination with a Docker image—a template for container creation—that the advantages of Docker start to become apparent. Docker images are constructed by adding new file system layers on top of preexisting file system layers. Each layer is made up of a static feature, such as the executables, libraries, and other configuration for an application, program, or utility. Upper level layers file paths that match preexisting files in lower layers mask the file from executing code.
For example, say you start with the existing official Redis layer, adding a new layer with its own redis.conf
configuration file will mask any existing redis.conf
file that is located at the same filepath or location:
A Docker Base image is an image that does not have a parent and are typically made up of the operating system, such as Ubuntu...