Created
July 29, 2018 04:42
-
-
Save wizact/bd2fc6f40dc46f2a7dd5e9fab74d5653 to your computer and use it in GitHub Desktop.
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
# Dockerizing Mongodb with ubuntu as base # Based on ubuntu:latest | |
FROM ubuntu:latest | |
MAINTAINER Amir Mohtasebi <[email protected]> | |
# Installation based on http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ | |
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 | |
# Installing mongodb-org | |
RUN apt-get update | |
RUN apt-get install -y mongodb-org | |
# Creating db folder | |
RUN mkdir -p /data/db | |
# Exposing port to Host OS | |
EXPOSE 27017 | |
EXPOSE 28017 | |
# Set entry point application | |
ENTRYPOINT ["/usr/bin/mongod"] | |
CMD ["--rest", "--httpinterface"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment