Sign inSign up
node-pm2 logo

siberia/node-pm2

By siberia

•Updated about 11 years ago

Basic docker image with node v0.12 and pm2 support

Image
1

299

siberia/node-pm2 repository overview

⁠node-pm2

This is a basic docker image with node v0.12 and pm2 (the process manager) installed.

This image is meant to be used as a base image for your apps. It will use /app folder as the place for the source code and the working directory. You do not need to provide your app as a volume, this image will take care of copying your app.

Also, the executable should be provided as an environment variable (SCRIPT). The default value is server.js.

Typical Dockerfile should look like this:

FROM siberia/node-pm2:latest
ENV PM2_SECRET aaaaa
ENV PM2_PUBLIC bbbbb
ENV PM2_HOST server

⁠Build your app

$ docker build -t my-container .

⁠To start the newly built container

⁠Start with default values

$ docker run --name my-app my-container

⁠Start with overriden environment variables

$ docker run -e "NODE_ENV=development" -e "PM2_SECRET=a" -e "PM2_PUBLIC=b" --name my-app my-container

Tag summary

Content type

Image

Digest

sha256:85734efb3…

Size

184.2 MB

Last updated

about 11 years ago

docker pull siberia/node-pm2