jiacheng-0/docker-nodejs-basic-demo

A simple demo running Node.js on Docker

★ 0Forks 0JavaScriptGitHub ↗Compare

README

Docker + Node.js

Dockerize a Node.js app.

Watch the full Docker video on YouTube or read the Docker Tutorial on Fireship.io.

Source

https://fireship.io/lessons/docker-basics-tutorial-nodejs/

Screenshots

Build

Run

Validate

Commands

Build

docker build -t jiacheng111/nodejs-demo-app:1.0 .

nerdctl build -t jiacheng111/nodejs-demo-app:1.1 .

Run

docker run --rm -p 5000:8080 jiacheng111/nodejs-demo-app:1.0

nerdctl run --rm -p 5000:8080 jiacheng111/nodejs-demo-app:1.1
  • --rm: This is the key flag. It tells Docker to automatically remove the container's file system when the container exits.

Validate

Version with bullseye (no vuls)

Build

docker build -t jiacheng111/nodejs-demo-app:1.1 .

Run

docker run --rm -p 5000:8080 jiacheng111/nodejs-demo-app:1.1

Contributors

codediodeiojiacheng-0

Issues