Sign inSign up

cogsmith/helloworld-nodejs

By cogsmith

โ€ขUpdated over 5 years ago

๐Ÿ–๏ธ Basic NodeJS Docker Example ๐Ÿ–๏ธ

Image
1

630

cogsmith/helloworld-nodejs repository overview

โ ๐Ÿ–๏ธ HELLOWORLD: Basic NodeJS Docker Example ๐Ÿ–๏ธ

โ Minimal example script for testing NodeJS and Docker instances

โ  [GITHUB REPO]โ 
โ ๐Ÿณ [DOCKER IMAGE]โ 
โ ๐Ÿงพ [VIEW APP SOURCE CODE]โ 


โ No Server Show Message And Exit
docker run --rm --name hello cogsmith/helloworld-nodejs

# HELLOWORLD: 695144B4BC64 @ 2021-02-18T01:19:03.199Z

โ Local Web Server @ Port 99
docker run -d --rm --name hellolocal --env PORT=9 -p 127.0.0.1:99:9 cogsmith/helloworld-nodejs ; sleep 1 ; curl http://127.0.0.1:99

# HELLOWORLD: 88ECF5397338 @ 0.0.0.0:80 @ 127.0.0.1:99 @ 2021-02-18T01:19:21.288Z

โ Public Web Server @ Port 80
docker run -d --rm --name helloworld --env PORT=9 -p 0.0.0.0:80:9 cogsmith/helloworld-nodejs ; sleep 1 ; curl http://localhost:80

# HELLOWORLD: 7A36215AC9D8 @ 0.0.0.0:80 @ LOCALHOST @ 2021-02-18T01:19:51.723Z

โ Clean Up
docker stop hello ; docker stop hellolocal ; docker stop helloworld ; docker rm hello ; docker rm hellolocal ; docker rm helloworld ; docker rmi cogsmith/helloworld-nodejs

Tag summary

Content type

Image

Digest

Size

38.6 MB

Last updated

over 5 years ago

docker pull cogsmith/helloworld-nodejs