This is a CentOS:7 base image with node.js and pm2 installed. This image was created like so:
$(boot2docker shellinit) docker run -i centos:7 /bin/bash yum update -y rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm yum install -y npm npm install -g pm2 yum install -y make yum install -y git-core exit docker commit -m 'node.js and pm2' -a "Adam Eivy" 9b93f815330f atomantic/pm2 docker push atomantic/pm2
FROM atomantic:pm2 # Bundle app source ADD app /app WORKDIR /app # Install app dependencies RUN npm install RUN npm rebuild CMD ["pm2", "--no-daemon start process.json"]
Additionally, v3 tag contains gulp and memcached.
I've gotten in the habit of having a Dockerfile and a Dockerfile.local. The Dockerfile.local looks like this:
FROM atomantic/pm2:v3 ENV APP_ENV QA ENV MEMCACHED true EXPOSE 3000 RUN mkdir -p /root/.pm2 RUN touch /root/.pm2/pm2.log
This allows me to dynamically mount my working app directory from OSX using a dev script and the local version of the image, which only differs in that it does not have a static app directory built into it.