Skip to content

This project demonstrates how to use Docker multi-stage builds to optimize a Node.js application. Multi-stage builds help reduce the image size by separating the build environment from the runtime environment.

Notifications You must be signed in to change notification settings

Randul-Malinhara/node-docker-multis-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Docker Multi-Stage Build Project

📜 Description

This project demonstrates how to use Docker multi-stage builds to optimize a Node.js application. Multi-stage builds help reduce the image size by separating the build environment from the runtime environment.

The project serves a basic "Hello World" API using Express.js and includes Dockerization to ensure the application is lightweight and production-ready.


🚀 Features

  • Node.js with Docker Multi-Stage Builds: Separate build and runtime stages to create smaller images.
  • Lightweight Production Image: Uses node:18-slim to minimize the final image size.
  • Portability: Easily deployable as a containerized application.

🛠️ Project Structure

node-docker-multis-sample/
├── app/
│   ├── package.json      # Node.js dependencies
│   ├── server.js         # Main application file
├── Dockerfile            # Docker multi-stage build file
├── .dockerignore         # Files to exclude from Docker image
└── README.md             # Project documentation

About

This project demonstrates how to use Docker multi-stage builds to optimize a Node.js application. Multi-stage builds help reduce the image size by separating the build environment from the runtime environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published