Skip to content

Instantly share code, notes, and snippets.

@sebastianvoss
Last active August 29, 2015 13:58
Show Gist options
  • Save sebastianvoss/9972889 to your computer and use it in GitHub Desktop.
Save sebastianvoss/9972889 to your computer and use it in GitHub Desktop.
mongod Dockerfile
FROM ubuntu:latest
# Add 10gen official apt source to the sources list
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
# Install MongoDB
RUN apt-get update
RUN apt-get install mongodb-10gen
# Create the MongoDB data directory
RUN mkdir -p /data/db
EXPOSE 27017
ENTRYPOINT ["usr/bin/mongod"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment