What Is Docker?
Docker is a set of the platform as service products that use OS-level virtualization to deliver software in packages called containers, which helps us to develop, manage and run your application, so you can deliver software application quickly and consistently.
Why Docker? and the advantages of it.
In existing software infra, there are some stumbling blocks which made existing infra to overcome with docker container.
Below are the some of the difficulties with existing infra,
- Time consumption in configuration and installation on every server enviornements (Dev, Stage and Production) .
- Require more resources to maintain server support.
- Unpredictability across the environments.
- Addressing Developer Enviornment for new resources in teams is very laborious.
Benefits of Docker Containerization
Consistent and Isolated Environment.
Containers have the abiltity to keep apps isolated not only from each other but also from thier underlying systems.this leads to massive productivity.
Flexibility
Even more complex application software can be easily containerized. It allows you to start and stop the services or apps rapidly in a flexible way, even if a new security patch is available.
Light Weight and Portable
Containers leverage and share the host kernel, making them much more efficient in terms of system resources than virtual machines. Containers have the added benefit of running anywhere, providing it is targeted at the OS (Win, Mac OS, Linux, VMs, On-prem, in Public Cloud), which is a huge advantage for both development and deployment.
Modularity and Scalable
Apply aggressive constraints and you can increase and automatically distribute container replicas across a datacenter. Docker containers make it easy to put new versions of softwares, with new business requirements into production quickl and also to quickly roll back to a previous version if you need to.
Docker Terminologies
Docker Daemon
This is also called as dockered, and it accepts the docker API requests and manages docker objects such as containers, images and volumes.
Docker Compose File
It is a command line tool and YAML file format with metadata defining and running multi-container applications. After you've created the definitions, you can deploy the whole multi-container application with a single command (docker-compose up) that creates a container per image on the Docker host.
Docker Client
Docker users can communicate with Docker through Docker client .when you run commands such as Docker run, Docker start ,the Docker client sends these commands to Docker Daemon.It can communicate with more than one Daemon too .
Docker Image
An Image is a read only template which comprises of multiple instructions for creation of containers.It includes all dependecies, deployments and configurations required by the container. Basically, the image will be derived from multple base images which are present on top of the stack to build the containers. Important to note that , image is immutable once it is created.
Docker Container
It is runnable instance of an image .You can create ,Start ,Stop ,Run ,Move and Remove a container using Docker APIs .It consists of the contents of a Docker image, an execution environment, and a standard set of instructions.
Docker Registry and Docker Hub
Docker registry is a service that provides acces to repos .registry and stores docker images. When you run Docker's pull or Docker push commands then the required images get pulled or pushed from/to configured registry. The default registry for most of the images will be Docker Hub.
Required Docker Commands
Commands Descriptions
Conclusion
This blog will help you to understand the basic concepts of Docker Containers.
I hope you enjoyed learning about this.
Thank you and Stay Safe.