Public Repository

Last pushed: 2 years ago
Short Description
Node and PM2 in a dockerfile
Full Description

Dockerfile

Docker Node Pm2 onbuild image

This image installs Pm2. When extended it will include your app, but it can also just be linked in.

FROM dockerfile/nodejs:latest

MAINTAINER Erik Günther "erik.gunther@sonymobile.com"


RUN apt-get update && \
  npm install -g pm2 && \
  mkdir -p /srv/app

WORKDIR /srv/app
ONBUILD COPY . /srv/app

VOLUME ["/srv/app"]
EXPOSE 80

CMD pm2 start app.js -x && pm2 logs

To include your app

In your project add Dockerfile with

FROM egut/pm2
MAINTAINER <your name>

and your done.

To run with this file

docker run -d -v /path/to/your/app:/srv/app -p 80:80 egut/pm2
Docker Pull Command
Owner
egut

Comments (0)