Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dockerfile for MongoDB 2.6.2 on ubuntu 13.10
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.2
RUN apt-get install -y --force-yes -q mongodb-org=2.6.2
RUN apt-get install -y --force-yes -q mongodb-org-shell=2.6.2
RUN apt-get install -y --force-yes -q mongodb-org-mongos=2.6.2
RUN apt-get install -y --force-yes -q mongodb-org-tools=2.6.2
RUN mkdir -p /data
RUN rm /etc/mongod.conf
RUN cd /etc/; ln -s /data/mongod.conf
# Define mountable directories.
VOLUME ["/data"]
# Define working directory.
WORKDIR /data
CMD ["mongod"]
# Expose ports.
# - 27017: process
# - 28017: http
EXPOSE 27017
EXPOSE 28017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment