Introduction to Docker
Hey there! Have you ever heard about docker? What are Docker’s components? How does it work? What is the advantage of using it? Hang on! We’re gonna talk about it in this article!
What is Docker?
Docker is an open-source application to integrate the files needed by software so that it becomes a complete unity and function. Setting data and supporting files are referred to as images. Next, the image sets are merged into a container called Container.
Docker has been a concern for developers since 2013, introduced by Solomon Hykes at the PyCon US event. Docker was first released in June 2014. Docker was developed by Solomon alongside his partners Andrea Luzzardi and Francois-Xavier Bourlet. At the time Docker was an internal dotCloud project. As a result, Docker is now a popular platform among developers in various parts of the world even though it is not very popular in Indonesia.
Docker itself is a company that provides container platform services. Docker’s capability is to be able to run a variety of applications with different system configurations, even if it is still in one computer or server device.
Docker Component
- Docker image: a file containing information and instructions for building containers. The image also serves to use and transmit information;
- Container: the environment for packing and running applications. This includes code, runtime, system tools, and settings. Containers can only access resources specified in the docker image;
- Docker client: which is a place where users can send commands such as docker build, docker pull, and docker run to Docker daeomon;
- Docker Engine Rest API: used to interact with Docker daemons. This can be accessed by clients via HTTP;
- Docker hosts: providing a complete environment for running applications. He is responsible for receiving orders given by Docker clients;
- Docker daemon: which is the process of managing Docker images, containers, networks, and storage volumes. The Docker daemon receives a request from the Docker API and will process it;
- Docker registry: a container for storing Docker images. Docker image will react according to the given command. For example, when given the docker push command, the docker image will be pushed or shared to the Docker Hub registry;
- Docker Hub: a service provided for finding and sharing container images with teams.
How does Docker Work?
First, the Docker client will talk to the Docker daemon via the Rest API. This conversation contains commands that need to be done.
As seen from the arrows, docker build serves to build the image. Docker pull plays a role in downloading or pulling images from the registry. While docker run will run the process in containers.
The Docker daemon will listen for the given command, then run the command by managing objects such as images, containers, and others.
Advantages of Using Docker
- Simple Configuration
The first advantage of Docker is that the configuration applied is quite simple and can be adapted to the needs of the application being developed. With just a few lines of code, Docker can already create its own environment that is different from the primary server environment. This will separate the need for infrastructure from the application environment
- Platform Multi-Cloud
Not only running on one cloud platform, but Docker can also be run on a variety of cloud platforms, making Docker flexible enough. These are the advantages and benefits of Docker that can be the main reason developers use Docker.
Some of the world’s largest cloud service providers have already started providing Docker support on their services. This is certainly in response to market demand that has begun to look to Docker to become a major architecture in the development of their systems.
Docker containers that can run across multiple cloud services allow an application to be ported between environments easily. Just like a virtual machine with a vdi file that it runs. It’s just that Docker is lighter and doesn’t use too much memory allocation to run it.
- Environmental Standardization & Version Control
When upgrading components usually the entire environment will be broken down. In the event of any problems with the process, Docker has a feature to be able to directly roll back to the previous version through a Docker image. This example of using Docker works faster than a Virtual Machine.
This is because Docker standardizes the environment by ensuring consistency across multiple version development and update processes.
- Can Conduct Continuous Application Testing and Distribution
The flexibility of running on all sorts of operating systems makes it easy to test applications using Docker. Without preparing configurations that sometimes take a very long time. That way, any testing process and then repairs can be done quickly.
- Isolation
Resources in each application are ensured to be isolated separately by Docker. So the user can adjust the needs on each application without having to affect the configuration on the other application.
For example, two applications A and B require the first version of the webserver. After the update process, it turns out that application A can only run using the second version of the web server so that changes must be made to the webserver. Whereas application B requires the first version of the webserver.
Of course, this will cause problems in any of the applications running on the same server.
- Security
Docker ensures running applications can’t affect containers or even give full control over traffic management and flow. Another security that Docker does is to set the host OS mount point with read-only so that it can not change any configuration there except those that have full access.