Question: What Is Docker Container?
Docker containers include the application and all of its dependencies, but share
the kernel
with other containers, running as isolated processes in user space on the host
operating
system.
Docker containers are not tied to any specific infrastructure: they run on any
computer, on
any infrastructure, and in any cloud.
Now explain how to create a Docker container, Docker containers can be created by
either
creating a Docker image and then running it or you can use Docker images that are
present
on the Dockerhub. Docker containers are basically runtime instances of Docker
images.
Question: What Is Docker Image?
Docker image is the source of Docker container. In other words, Docker images are
used
to create containers.
Images are created with the build command, and they’ll produce a container when
started
with run.
Images are stored in a Docker registry such as registry.hub.docker.com because they
can
become quite large, images are designed to be composed of layers of other images,
allowing a minimal amount of data to be sent when transferring images over the
network.