github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/docs/sources/examples/mongodb/Dockerfile (about) 1 # Dockerizing MongoDB: Dockerfile for building MongoDB images 2 # Based on ubuntu:latest, installs MongoDB following the instructions from: 3 # http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ 4 5 FROM ubuntu:latest 6 MAINTAINER Docker 7 8 # Installation: 9 # Import MongoDB public GPG key AND create a MongoDB list file 10 RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv 7F0CEB10 11 RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list 12 13 # Update apt-get sources AND install MongoDB 14 RUN apt-get update && apt-get install -y mongodb-org 15 16 # Create the MongoDB data directory 17 RUN mkdir -p /data/db 18 19 # Expose port #27017 from the container to the host 20 EXPOSE 27017 21 22 # Set /usr/bin/mongod as the dockerized entry-point application 23 ENTRYPOINT ["/usr/bin/mongod"]