Tuesday, December 3, 2019

What is a docker image



A Docker image is a file, comprised of multiple layers, used to execute code in a Docker container. ... When the Docker user runs an image, it becomes one or multiple instances of that container. Docker is an open source OS-level virtualization software platform primarily designed for Linux and Windows.

Docker is an open source OS-level virtualization software platform primarily designed for Linux and Windows. Docker uses resource isolation features of the OS kernel, such as cgroups in Linux, to run multiple independent containers on the same OS.  A container that moves from one Docker environment to another with the same OS will work without changes, because the image includes all of the dependencies needed to execute the code

A container differs from a virtual machine (VM), which encapsulates an entire OS with the executable code atop an abstraction layer from the physical hardware resources

A Docker image is made up of multiple layers. A user composes each Docker image to include system libraries, tools, and other files and dependencies for the executable code. Image developers can reuse static image layers for different projects. Reuse saves time, because a user does not have to create everything in an image.

Most Docker images start with a base image, although a user can build one entirely from scratch, if desired. Each image has one readable/writable top layer over static layers. Layers are added to the base image to tailor the code to run in a container. Each layer of a Docker image is viewable under /var/lib/docker/aufs/diff, or via the Docker history command in the command line interface (CLI). By default, Docker shows all top-layer images, such as the repository, tags and file sizes. Intermediate layers are cached, which makes top layers easier to view. Docker utilizes storage drivers to manage contents of image layers.



References:
https://searchitoperations.techtarget.com/definition/Docker-image


No comments:

Post a Comment