Docker Introduction

Docker At A Glance

docker in a nutshell

Docker Components

Docker consists of several components:

  • Docker container: Instance of one docker image
  • Dockerfile: File that consists of several commands to build the docker image.
  • Compose file: File that compiles several containers into one service unit.

Let's Build A Docker Container

The first step is of course to install docker. For windows, you need to enable WSL 2 first before you can use docker on your machine. You can check out this link to install docker-engine on your machine. Once you have installed it on your machine, the next step is to create a docker file in your project folder. For this example, I use a modified file compressor service code in my LAW second assignment. I made the modification on main.go so it becomes like this.

$ sudo docker build -t <container-image-name> .
example
$ sudo docker build -t file-compressor.
$ sudo docker run -p <host-ip> (optional):<host-port>:<container-port> <container-image-name>
example
$ sudo docker run -p 8086:8086 file-compressor
#This will list down all container
$ sudo docker ps -a
#Stop the container
$ sudo docker stop <CONTAINER_ID>

Why We Don’t Use Docker In Our Software Engineering Project

We don’t use docker in our software engineering project because so far we don’t encounter any compatibility issues whether in the development team machine or the Heroku environment. Secondly, our backend application & frontend application are deployed separately in Heroku. Actually, my friend Akbar decided not to use docker for deployment so he may know more about the reasons for this. So here’s our software architecture for paperless judicial process applications.

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store