
Kubernetes Journey Part 2: How to Dockerize a Project?
to dockerize an application, firstly we need the code, I am taking a sample Getting Started with Docker project. After cloning, to dockerize the app, we neeed to create a Dockerfile which will have instructions to containerize the app. Using touch Dockerfile command, we will create a Dockerfile. then using vi Dockerfile command, it will open the file in a visual editor inside the terminal itself. To begin the dockerization, first thing we will need a base OS image on which our app will be installed. So, first instruction would be the base OS image, we will be using: FROM node:18-alpine Here, 18 is the node version and alpine is a lightweight linux based OS with minimum libraries and won't take a lot of space. We can use a linux based OS image as well like ubuntu and then install node on top of it, but it will make the image heavier as ubuntu will have some default dependencies and libraries. So, we will be using node base image as it provides an OS already. Next, we define where we'll
Continue reading on Dev.to
Opens in a new tab



