A generic container for spinning up node apps.
-
Add a Dockerfile to your repo.
FROM getable/nodeapp
-
Build:
docker build -t myNodeApp .
-
Run:
docker run -d --restart=always -P myNodeApp
NODE_ENV
defaults to production. You can override by passing an env var to the run script with:-e "NODE_ENV=staging"
- The docker file exposes port 80.
Pushing to this repo pushes to the official docker image.