Category : Docker | Sub Category : Docker for Java Developers | By Prasad Bonam Last updated: 2022-02-06 14:20:23 Viewed : 442
Docker
simplifies software delivery of distributed applications in three ways:
Build
Provides tools you can use to
create containerized applications. Developers package the application, its
dependencies and infra‐ structure, as read-only templates. These are called the
Docker image.
Ship
Allows you to share these
applications in a secure and collabo‐ rative manner. Docker images are stored,
shared, and managed in a Docker registry
Docker Hub is a publicly available registry.
This is the default registry for all images
Run
The
ability to deploy, manage, and scale
these applications. Docker container is a runtime
representation of an image. Con‐ tainers can be run, started, scaled,
stopped, moved, and deleted
Docker architecture
Docker host
A machine, either physical or virtual, is identified
to run the Docker Engine.
Configure Docker client
The Docker client binary is downloaded on a machine and con‐ figured
to talk to this Docker Engine. For development pur‐ poses, the client and
Docker Engine typically are located on the same machine. The Docker Engine
could be on a different host in the network as well.
Client downloads or builds an image
The client can pull a prebuilt image from the preconfigured reg‐
istry using the pull command,
create a new image using the build command, or run a container using the run
command.
Docker host downloads the image from the registry
The Docker Engine
checks to see if the image already
exists on the host. If not, then it downloads
the image from the registry. Multiple images can be
downloaded from the registry and installed
on the host. Each image would represent a different software component. For example, WildFly and Couchbase are downloaded in this
case.
Client runs the container
The new container can be created using the run command, which runs the container using the image definition. Multiple containers, either of the same image or different images, run on the Docker host.
Docker images are read-only templates from which Docker contain‐ ers are launched. Each image consists of a series of layers. Docker makes use of a union filesystem to combine these layers into a single image. Union filesystems allow files and directories of separate file‐ systems, known as branches, to be transparently overlaid, forming a single coherent filesystem.
Docker Engine
Docker Engine is
the central piece of Docker. It is a lightweight run‐ time that builds and runs
your Docker containers. The runtime con‐ sists of a daemon that communicates
with the Docker client and execute commands to build, ship, and run containers.