Table of contents
- Running node-todo-cicd app using Docker
- Project Details
- Steps to Complete the Project
- STEP:1 Launch an EC2 instance and install Docker into it.
- Step-2 Clone your repository
- Step- 3 Create a Dockerfile
- 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.
- THAT'S ALL FOR TODAY'S LEARNING
Running node-todo-cicd app using Docker
Project Details
Objective
Containerizing node-todo-cicd-application
Steps to Complete the Project
Launch an EC2 instance and install Docker into it.
Clone your repository.
Create a Dockerfile.
Run the Dockerfile to create an image, and then create a container from the image.
Create the container and map it to port 8000:8000.
Enable port 8000 in your instance.
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