https://github.com/acanguven/node-docker-multi-stage-pipeline
Nodejs multi-stage Dockerfile for secure, lean and fast images.
https://github.com/acanguven/node-docker-multi-stage-pipeline
docker dockerfile nodejs
Last synced: 4 months ago
JSON representation
Nodejs multi-stage Dockerfile for secure, lean and fast images.
- Host: GitHub
- URL: https://github.com/acanguven/node-docker-multi-stage-pipeline
- Owner: Acanguven
- Created: 2019-05-15T20:26:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:51:34.000Z (over 3 years ago)
- Last Synced: 2025-04-22T12:30:35.677Z (about 1 year ago)
- Topics: docker, dockerfile, nodejs
- Language: Dockerfile
- Homepage:
- Size: 715 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Multi-Stage NodeJs Pipeline
Example implementation of Docker multi-stage pipeline for Nodejs
One of the challenges facing Nodejs developers is providing a reliable build, test, prepare for production pipeline.
To solve this issue we use Docker multi-stage pipeline. Check out [Dockerfile](./Dockerfile) for better understanding
## [Multi-stage pipeline](./Dockerfile)
### no-cache run
```bash
time docker build . -t optimized --no-cache
```
* Duration: 57.856 seconds
* Image Size: 73MB
### cache run (source file changed)
```bash
time docker build . -t optimized
```
* Duration: 10.790 seconds
* Image Size: 73MB
## [Unoptimized pipeline](./Dockerfile_unoptimized)
### no-cache run
```bash
time docker build -f Dockerfile_unoptimized . -t unoptimized --no-cache
```
* Duration: 41.761 seconds
* Image Size: 374MB
### cache run (source file changed)
```bash
time docker build -f Dockerfile_unoptimized . -t unoptimized
```
* Duration: 12.372 seconds
* Image Size: 374MB