πŸš€ Docker in DevOps – Node.js Deployment on AWS EC2 (Week 12 Journey)



This content originally appeared on DEV Community and was authored by Azmat Ahmed

πŸš€ Docker in DevOps – Node.js Deployment on AWS EC2 (Week 12 Journey)

In Week 12 of my DevOps journey, I focused on Docker and successfully deployed a Node.js app on AWS EC2.

πŸ”Ή What I Did

  • Wrote a Dockerfile with Node.js as the base image.
  • Installed dependencies automatically with:

dockerfile
  COPY package*.json ./
  RUN npm install
Built image:

bash
Copy code
docker build -t my-node-app .
Ran container:

bash
Copy code
docker run -p 3000:3000 my-node-app
Configured AWS EC2 security groups for port 3000.

🔹 Why Docker?
Removes manual setup

Creates consistent environments

Speeds up deployments

Root tool of DevOps automation

📂 Links
👉 GitHub Repo: https://github.com/azmatahmed11/docker-push-docker
🌐 Portfolio: https://azmatahmed.netlify.app/

🔑 Keywords
Docker, DevOps, Node.js app deployment, AWS EC2, Dockerfile, containerization, automation


This content originally appeared on DEV Community and was authored by Azmat Ahmed