Docker Project-2 for DevOps Engineers

Docker Project-2  for DevOps Engineers

Running node-todo-cicd app using Docker

Project Details

Objective

Containerizing node-todo-cicd-application

Steps to Complete the Project

  1. Launch an EC2 instance and install Docker into it.

  2. Clone your repository.

  3. Create a Dockerfile.

  4. Run the Dockerfile to create an image, and then create a container from the image.

  5. Create the container and map it to port 8000:8000.

  6. Enable port 8000 in your instance.

  7. Put the instance IP address into the browser to check whether we can see our application.

STEP:1 Launch an EC2 instance and install Docker into it.

adding user to the docker group so that we don't have to use sudo again and again.

Step-2 Clone your repository

Step- 3 Create a Dockerfile

FROM node:12.2.0-alpine
WORKDIR app
COPY . .
RUN npm install
RUN npm run test
CMD ["node","app.js","runserver","0.0.0.0:8000"]

Step-4 Run the Dockerfile to create an image, and then create a container from the image

Step-5 Create the container and map it to port 8000:8000

Step-6 Enable port 8000 in your instance.

Step-7 Put the instance IP address into the browser to check whether we can see our application

Here our task is finished

THAT'S ALL FOR TODAY'S LEARNING

I HOPE YOU LEARN SOMETHING FROM THIS BLOG