Skip to content

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

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages