Created
November 10, 2015 16:14
-
-
Save erangaeb/152906c9dee444f37453 to your computer and use it in GitHub Desktop.
mongodb docker file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
MAINTAINER Eranga Bandara([email protected]) | |
# Import MongoDB public GPG key AND create a MongoDB list file | |
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" | sudo tee /etc/apt/sources.list.d/mongodb.list | |
# Update apt-get sources AND install MongoDB | |
RUN apt-get update | |
RUN apt-get install -y mongodb-org | |
# Data directory volume | |
VOLUME ["/data/db"] | |
WORKDIR /data | |
EXPOSE 27017 | |
CMD ["mongod"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment