Understanding Docker

Krisna Dwitama
4 min readMay 25, 2021
Source: https://medium.com/programmer-zaman-now/kenapa-wajib-mengerti-docker-6b48bc2c05c3

Hello everyone, now I will present to you all some of the things about Docker that is popular in information technology. There are also cloud technology that can solve many problem, but docker also can solve these problems too with some differences.

What is Docker?

Docker is an open-source software platform or tool that work like a container that make the applications easier to create, deploy, and run. The containers will package up an application with all of its parts, such as libraries and other dependencies, and will deploy the application as one package. By doing such way, we can trust that the application is able to run on any machine regardless of the customized settings that the machine will have.

Understanding containers

Containers is a software that must include these three categories:
1. Builder: Technology used to build a container.
2. Engine: Technology used to run a container.
3. Orchestration: Technology used to manage many containers.

One of the benefits of using containers is the ability to shut down nicely and can turn on upon demand. When a container is damaged by a crash or the container is no longer needed when server traffic is low, we can start the containers with a cheap cost, and containers also designed to seamlessly appear and disappear. That is because containers are meant to be a temporary instance and meant to spawned as often as required, the monitoring and managing of these containers is not done by a human, but instead automated in real-time.

One of the containers is Linux containers. Linux Containers have facilitated a massive shift in high-availability computing. There are also many toolsets that can help you run services in containers. Docker is one option that is defined by Open Container Initiative (OCI) as an industry standards organization meant to encourage innovation while avoiding certain danger. OCI make you can choose a container toolchain, such as: Docker, OKD, Podman, rkt, OpenShift, and others. When you decide to run some services in containers, then you are most likely need a software that is designed to be the host and manage those containers. This is known as container orchestration and there is Kubernetes that provides container orchestration for a variety of container runtimes.

Docker Components

  1. Docker Client
    Docker client is the users that interact with the Docker. Docker runs in a client-server architecture, so that the docker client can connect to the docker server/host. Docker client and host (daemon) may running on same host or running on different hosts and communicate through sockets or a RESTful API. Docker Client can communicate with more than one daemon.
  2. Docker Host
    Docker host is an instance that provides a complete environment to execute and run applications. It includes Docker daemon, Images, Containers, Networks, and Storage.
  3. Docker Daemon
    Docker Daemon is a persistent background process that do the managing of Docker images, containers, networks, and storage volumes. Docker Daemon also constantly listens and processes Docker API requests. Docker daemon is responsible for all container-related actions and can receives the command via Docker CLI or REST API. In managing its services, it also can communicate with other daemons. The Docker daemon also pulls and builds container images as requested by the client.
  4. Docker Images
    Docker-images are a read-only binary template that is used to build containers. Images also contain the description of the container’s capabilities and needs in form of metadata. We can share container images locally in teams using a private container registry, or share it with the world using a public registry like Docker Hub.
  5. Docker Containers
    A container is a instance that will run the image. We can create, start, stop, move, or delete a container easily using Docker CLI or API. We can connect the container to networks, attach storage to the container, and create a new image based on current state. Containers can only access resources that are defined in the image and can be given additional access during building the image into a container.
  6. Docker Networking
    Docker networking make we can communicate one container to other containers. By default, there are three different networks on the installation of a Docker, that is None, Bridge, and Host. The none and host networks are part of the network stack in Docker. The bridge network then will automatically creates a gateway and IP subnet to all containers that belong to that network so that those containers can talk to each other via IP addressing.
  7. Docker Storages
    Container is volatile, so that the container will lose all of its data when it is removed or killed. If we want to keep the container data, then we can use the docker storage concept. We can store the data in a writable layer of a container, but we need a storage driver to do it.
  8. Docker Registries
    Docker Registries are a service that provide locations of where we can store and download images. That means a Docker registry is a repositories that host one or more Docker Images. There are public registries such as Docker Hub and Docker Cloud, and private registries. We can also create a new private registry.

That is some of the things that I share to you about Docker. I hope these things can improve our knowledge about the Docker thing and can be a help in the future. Thank you for reading this article.

Sources:
https://blog.knoldus.com/docker-components/
https://opensource.com/resources/what-docker
https://www.niagahoster.co.id/blog/docker-tutorial/

--

--