Skip to content

Instantly share code, notes, and snippets.

@reiz
Created June 29, 2014 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reiz/a2b76b37279c4fd11287 to your computer and use it in GitHub Desktop.
Save reiz/a2b76b37279c4fd11287 to your computer and use it in GitHub Desktop.
Dockerfile reiz/mongodb:1.0.2
FROM ubuntu:13.10
MAINTAINER Robert Reiz <reiz@versioneye.com>
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list
RUN apt-get update
RUN apt-get install -y --force-yes -q apt-utils
RUN apt-get install -y --force-yes -q adduser
RUN apt-get install -y --force-yes -q mongodb-org-server=2.6.3
RUN apt-get install -y --force-yes -q mongodb-org=2.6.3
RUN apt-get install -y --force-yes -q mongodb-org-shell=2.6.3
RUN apt-get install -y --force-yes -q mongodb-org-mongos=2.6.3
RUN apt-get install -y --force-yes -q mongodb-org-tools=2.6.3
RUN mkdir -p /data
# Define mountable directories.
VOLUME ["/data"]
# Define working directory.
WORKDIR /data
CMD mongod -f /data/mongod.conf
# Expose ports.
# - 27017: process
# - 28017: http
EXPOSE 27017
EXPOSE 28017
@reiz
Copy link
Author

reiz commented Jun 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment