What is Docker and Introduction Assignment

What is Docker?

Docker is an open source containerization platform. It enables developers to package applications into containersā€”standardized executable components combining application source code with the operating system (OS) libraries and dependencies required to run that code in any environment. Containers simplify delivery of distributed applications, and have become increasingly popular as organizations shift to cloud-native development and hybrid multi-cloud environments.

What is a Container?

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

Benefits of Docker

Key Benefits of Docker Containers
Consistent and Isolated Environment
Cost-effectiveness with Fast Deployment
Mobility ā€“ Ability to Run Anywhere
Repeatability and Automation
Collaboration, Modularity and Scaling
Test, Roll Back and Deploy

Docker Architecture

Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.

ā€¢ Container lifecycle

There are different stages when we create a Docker container which is known as Docker Container Lifecycle. Some of the states are:

Created: A container that has been created but not started

Running: A container running with all its processes

Paused: A container whose processes have been paused

Stopped: A container whose processes have been stopped

Deleted: A container in a dead state

How Docker Works?

Docker packages, provisions and runs containers. Container technology is available through the operating system: A container packages the application service or function with all of the libraries, configuration files, dependencies and other necessary parts and parameters to operate. Each container shares the services of one underlying operating system. Docker images contain all the dependencies needed to execute code inside a container, so containers that move between Docker environments with the same OS work with no changes.

Docker uses resource isolation in the OS kernel to run multiple containers on the same OS. This is different than virtual machines (VMs), which encapsulate an entire OS with executable code on top of an abstracted layer of physical hardware resources.