Docker is a tool designed to make it easier to create, deploy, and run
applications by using containers. Containers allow a developer to package
up an application with all of the parts it needs, such as libraries and other
dependencies, and ship it all out as one package. By doing so, thanks to the
container, the developer can rest assured that the application will run
on any other Linux machine regardless of any customized settings that
machine might have that could differ from the machine used for writing
and testing the code.

In a way, Docker is a bit like a virtual machine. But unlike a virtual
machine, rather than creating a whole virtual operating system, Docker
allows applications to use the same Linux kernel as the system that
they’re running on and only requires applications be shipped with things
not already running on the host computer. This gives a significant
performance boost and reduces the size of the application.

An image is an immutable file which contains required binaries and libraries
needed to make a container and a running instance of an image is called
a container. Images are composed of layers of other images. Images are
created when we run the build command of Docker and containers are formed
from these images when we use the run command of Docker. There can be
many containers for the same image.