Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.
Docker includes components such as Docker client, Docker server, Docker machine, Docker hub, Docker composes, etc.
Why docker and backstory of virtualization/containerization?
Docker works by providing a standard way to run your code. Docker is an operating system for containers. Similar to how a virtual machine virtualizes (removes the need to directly manage) server hardware, containers virtualize the operating system of a server. Docker is installed on each server and provides simple commands you can use to build, start, or stop containers
Docker containers are lightweight alternatives to the virtual machine. The advantage of using a docker container is that you don't need to allocate any RAM and disk space for the applications. It automatically generates storage and space according to the application requirement.
Containers | Virtual Machine |
Integration in a container is faster and cheap | Integration in virtual is slow and costly |
It uses the same kernel, but different distribution | It uses multiple independent operating systems |
Multiple docker containers can be started from one docker image | one set of VM can be started from one VMX or VMDK file |
Security mandatory access control can be leveraged | Security depends on the implementation of a hypervisor |
why use Docker?
SHIP MORE SOFTWARE FASTER | STANDARDIZE OPERATIONS | SEAMLESSLY MOVE | SAVE MONEY |
Docker users on average ship software 7x more frequently than non-Docker users. Docker enables you to ship isolated services as often as needed | Small containerized applications make it easy to deploy, identify issues, and roll back for remediation | Docker-based applications can be seamlessly moved from local development machines to production deployments on AWS | Docker containers make it easier to run more code on each server, improving your utilization and saving you money |
Docker engine and Docker architecture
It is a client-server application that contains the following major components. A server is a type of long-running program called a daemon process. The REST API is used to specify interfaces that programs can use to talk to the daemon and instruct it on what to do. A command line interface client.
Docker daemon runs on the host operating system. It is responsible for running containers to manage docker services. Docker daemon communicates with other daemons. It offers various Docker objects such as images, containers, networking, and storage.
Docker architecture
The Docker client uses commands and REST APIs to communicate with the Docker Daemon (Server). When a client runs any docker command on the docker client terminal, the client terminal sends these docker commands to the Docker daemon
Docker Host is used to providing an environment to execute and run applications. It contains the docker daemon, images, containers, networks, and storage.
Docker Registry manages and stores the Docker images. There are two types of registries in Docker :
Pubic Registry - Public Registry is also called as Docker hub.
Private Registry - It is used to share images within the enterprise.
Docker: Lifecycle from a Dockerfile to a container
A Docker container is a virtualized runtime environment used in application development. It is used to create, run and deploy applications that are isolated from the underlying hardware. A Docker container can use one machine, share its kernel and virtualize the OS to run more isolated processes. As a result, Docker containers are lightweight
A Docker image is like a snapshot in other types of VM environments. It is a record of a Docker container at a specific point in time. Docker images are also immutable. While they can't be changed, they can be duplicated, shared or deleted. The feature is useful for testing new software or configurations because whatever happens, the image remains unchanged.
- Containers need a runnable image to exist. Containers are dependent on images because they are used to construct runtime environments and are needed to run an application.
Anatomy of a Docker Image
When to use Docker
Microservices
Continuous Integration and delivery
Data processing
Container as a service
This was a brief overview of Docker: what, why and how? to use it.
In the further section, we will be talking more about Docker, its installations, its use cases, and the commands that enable us to configure deploy and monitor our containers and microservices applications around it.
Want to learn and explore more about Docker? Then do check out the Docker blog series
Hop into the blog section for a more interesting and detailed overview of Software development and other stuff. 😊