Skip to content

Instantly share code, notes, and snippets.

@tchap
Last active December 19, 2015 18:59
Show Gist options
  • Save tchap/6002698 to your computer and use it in GitHub Desktop.
Save tchap/6002698 to your computer and use it in GitHub Desktop.
Dockerfile to run a Node.js server backed by MongoDB.
FROM tchap/centos-epel
MAINTAINER Ondrej Kupka "[email protected]"
# Update packages
RUN yum update -y --exclude=upstart
# Install Node.js
RUN yum install -y nodejs npm
# Install MongoDB
RUN yum install -y mongodb-server
# Install Supervisord
RUN yum install -y python-setuptools
RUN easy_install supervisor
# Copy Supervisord files into the image
ADD supervisord.conf /etc/supervisord.conf
ADD supervisord.d /etc/supervisord.d
# Expose 3000
EXPOSE 3000
# Run Supervisord on image start
# It could be just "supervisord", but let's get rid of a few WARNing messages.
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment