Docker, a Software Platform

Nadhif Suyudi
bisaGo2020
Published in
4 min readDec 22, 2020
Photo by Markus Spiske on Unsplash

What is Docker?

Let us immediately start explaining the definition of Docker.

Docker is an open platform for developing, shipping, and running applications. Docker enables us to separate our applications from the infrastructure so we can deliver software quickly. With Docker, we can manage our infrastructure in the same ways we manage our applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, we can significantly reduce the delay between writing code and running it in production.

Docker provides the ability to package and run an application in a loosely isolated environment called a container. Containers provide a highly efficient and highly granular mechanism for combining software components into the kinds of application and service stacks needed in a modern enterprise, and for keeping those software components updated and maintained.

Docker makes it easy for developers to develop and deploy apps inside neatly packaged virtual containerized environments. This means apps run the same no matter where they are and what machine they are running on.

Simply put, the days of where people said, “It is working on my machine” are long gone.

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 communicate using a REST API, over UNIX sockets or a network interface.

Docker Architecture

There are several things that you must know,

  • The Docker daemon (dockerd), listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.
  • The Docker client (docker), the primary way that many Docker users interact with Docker. When you use commands such as docker run, the client sends these commands to dockerd, which carries them out. The docker command uses the Docker API. The Docker client can communicate with more than one daemon.
  • A Docker registry, stores Docker images. Docker Hub is a public registry that anyone can use, and Docker is configured to look for images on Docker Hub by default. The commands for this are like docker pull, docker run, and docker push.
  • Docker objects, things that used and created when using Docker, like images (read-only template with instructions), containers (a runnable instance of an image), etc.

My Implementation of Docker

BisaGo application was already used Docker and we thought it is already run quite well. But, everything went downhill during our 3rd sprint. Our application suddenly have many errors when we deployed the application. The main problem lies on the GitLab Pipeline that couldn’t recognize some of the attributes we used, even though they worked on our local devices. Then, we decided to update our Docker Image.

Since we at first don’t really understand about Docker, we decided to tackle this problem together. After a few hours, the previous Dockerfile was updated and become like this.

Updated Dockerfile

In order to use the Dockerfile, we need to build the image first. To build it, we use command docker build -t poipole/bisago. To check our Docker image in our local, we run command docker image ls. After we’ve finished building the image, we can now push it to the Docker repository. We use command docker push poipole/bisago to push it.

Lastly, we need to modify the .gitlab-ci.yml file in order to use the Docker Image. Since the docker image name is poipole/bisago-be, then we just need to do this.

Updated .gitlab-ci.yml file

At first, I thought Docker is hard and very intimidating. I thought I will have a hard time to learn it. But with help of other developer, which is my teammates, I can understand more about Docker. Like people always said, we just need to keep practicing.

Well then, cheers~

— A certain person who wish for a happy ending for a certain heroine

--

--

Nadhif Suyudi
bisaGo2020

A Computer Science student who learns about Software and Game Development. Also like Photography and Writing.