Public Repository

Last pushed: a year ago
Short Description
MongoDB on ubuntu
Full Description

Docker file

##############################

##Doker file to build MongoDB images

base image ubuntu

##############################

use base image as ubuntu

FROM ubuntu

Define author of Dokcer file

MAINTAINER RahulGoyal

##update repo source list
RUN apt-get update

Install mongo DB

# Add the package verification key

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

Add MongoDB to repo

RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list

##update repo source list
RUN apt-get update

Install MongoDB package (.deb)

RUN apt-get install -y mongodb-10gen

Create the default data directory

RUN mkdir -p /data/db

Bind port 27017 with host

EXPOSE 27017

Default port to execute the entrypoint (MongoDB)

CMD ["--port 27017"]

Set default container command

ENTRYPOINT usr/bin/mongod

Docker Pull Command
Owner
rahulgoyal