Development & Maintainability: Software Architecture

Akbar Novial
bisaGo2020
Published in
4 min readDec 3, 2020

With the increase of technology in this day and era, there comes a platform the helps us in developing and maintaining our software, which is Docker.

Docker is an open platform that has many uses, such as for developing, shipping, and running applications. Developers use Docker to deploy an application inside a container that runs on the host operating system. Docker also separates your applications by packaging the code, dependencies, system tools, runtime, setting, etc. This ensures the application to run uniformly and consistently in any supported environment. There are some terms we should know when working with docker, which are:

  • Images, which are executable packages that have everything needed to run the application, such as the code, dependencies, runtime, configuration files, environment variables, etc.
  • Containers, which are the runtime instances of images, while images are the blueprint that constructs the base of the container. Therefore, running a docker image creates a container, and the container runs the actual application.
  • Services, which allow you to scale containers across multiple Docker daemons that all work together as a swarm with multiple managers and workers.

Docker Architecture

Docker uses a client-architecture. It works by having the Docker client talk to the Docker daemon. The Docker daemon does all of the heavy lifting, such as building, running, and distributing the Docker containers. Furthermore, the Docker client and daemon use a REST API to communicate with each other over a network interface.

  • The Docker daemon (dockerd) listens for Docker API requests and manages Docker objects(images, containers, networks, and volumes) and can communicate with other daemons to manage docker services.
  • The Docker client (docker) is the primary way the users use Docker. When using commands, the client will send those commands to dockerd which will carry them out. The docker command uses the Docker API.
  • Docker registries store Docker images. We can use Docker Hub, which is a public registry, to look for images. The commands we can use are commands like docker pull , docker run, and docker push.
  • Docker objects are the things used and created when using Docker, likely images, containers, networks, volumes, plugin, etc.

BisaGo Team’s experience using Docker

The BisaGo team from last year has already implemented Docker to the project. However, this year’s team encounters some problems coming from Docker. These problems are caused by the Docker image, which was outdated, leading to errors when deploying the application. The main problem we encountered was that the Gitlab Pipeline couldn’t recognize some of the attributes we used, even though they worked on our local devices. Ergo, we had to update the Docker image, and we did that by doing these steps.

  1. Create a new Dockerfile. Although last year’s team had already created a Dockerfile, we encountered some problems as it always failed when building. So, with the help of our ScrumMaster, we created a new Dockerfile.
The previous Dockerfile
The newly created Dockerfile

2. Build the image, by using the command docker build -t poipole/bisago. We can also check the docker image by using the command docker image ls.

3. Push the new Docker image to our repository, by using the command docker push poipole/bisago.

4. Lastly, we need to modify our .gitlab-ci.yml file to take the newly created docker image.

.gitlab-ci.yml

To conclude, Docker can be significant in development, as it also brings many benefits, such as bringing consistency, speed, isolation, and lightweight to your application.

All Aboard The Docker Whale!!!

References:

--

--