Dock·er
/ˈdäkər/
Spooky Scary Skeleto- What? What do you mean we’re live?!! It’s Halloween! We’re not supposed to-
PLEASE STAND BY
Whoops! Sorry for the technical difficulties, folks! Welcome again this week to our special show, hosted by your special (needs) host! This week, we are going to talk about Docker!
CI/CD
Alright, so first off, we need to know, what exactly is CI/CD? Well, CI/CD stands for Continuous Integration (CI) and Continuous Deployment or Continuous Delivery (CD). Tools and concepts around CI/CD help developers deliver value faster and more transparently.
Continuous Integration
CI is usually known as the less “troublesome” of the two. Continuous Integration uses automation tools that empower development teams to build and test code after each merge as seamlessly as possible. The key component of the CI/CD ecosystem is the test environment, which reduces the testing time by automatically spotting the most serious bugs at early stages of software delivery. Automated code testing smooths out the process. Running regular integration testing is crucial to maintaining software consistency.
Continuous Deployment
CD enables the code to be packaged and delivered with a fully automated deployment process. Small but more frequent releases are much easier to conduct and a whole lot less risky than big-bang integrations done ‘by hand’.
CI/CD in UKM Indonesia
Of course, you must be wondering how CI/CD is implemented in our project, right? Well, first of all, our product owner asks us to use AWS (Amazon Web Service), as the old website had already been using it. For deployment, AWS uses something called “AWS Amplify Console”. It provides a workflow that is Git-based (using something we’re already accustomed to), for hosting fullstack serverless web apps with continuous deployment.
The AWS Amplify Console simplifies the deployment of our application frontend and backend. Connect to the code repository and the frontend and backend are deployed in a single workflow, on every code commit. This ensures that the web application is only updated after the deployment is successfully completed, eliminating inconsistencies between the application front end and backend. Below is our amplify.yml script:
Docker
a person who works at a port, putting goods onto and taking them off ships
As usual, docker according to the Cambridge English Dictionary means someone who works at a port, basically a longshoreman. Finally we got to docker. So basically, Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they’re running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.
For our project, Docker will make a container out of our Angular App, and for deployment, we will use the built-in Gitlab CI/CD. It will be deployed because we use a file called “.gitlab-ci.yml”. After running the “yml” files, it will go through stages. Currently, we have 2 stages to go through: The testing stage, currently tested with the default from Angular; and the second is the deployment to Fasilkom’s Docker Registry.
Docker can build images automatically by reading the instructions from a Dockerfile. From a Dockerfile and a context, Docker Daemon can build the image any way we want. The Dockerfile can be used side-by-side with our “.gitlab-ci.yml”. Below is our Dockerfile:
Summary
In a nutshell, here’s what Docker can do for you: It can get more applications running on the same hardware than other technologies; it makes it easy for developers to quickly create ready-to-run containered applications; and it makes managing and deploying applications much easier.
Welp, here’s me signing off. Here’s some words of wisdom I found:
Doviđenja~