The command: curl -L -o- http://bit.do/node-hello-docker | bash
After it's run you can open http://localhost:3333
Sometimes you just want to spin a Docker container in order to test stuff. But without a "persistent" command (e.g. a server) it exits right away.
This Gist just provides a tiny shell script that will:
- pull a Node image (
node:16-alpine
in this case) - download a mini-server (
hello.js
, from Node.js Getting Started) - Run this mini-server in the container