Public Repository

Last pushed: 2 years ago
Short Description
The latest mongodb docker image
Full Description

This image is build from a Dockerfile. The content of the file is belows.

############################################################
# Dockerfile to build MongoDB container images
# Based on Ubuntu
# Ref: https://www.digitalocean.com/community/tutorials/docker-explained-using-dockerfiles-to-automate-building-of-images
############################################################

# Set the base image to Ubuntu
FROM ubuntu

# File Author / Maintainer
MAINTAINER Liudonghua <liudonghua123@gmail.com>

# Update the repository sources list
RUN apt-get update

################## BEGIN INSTALLATION ######################
# Install MongoDB Following the Instructions at MongoDB Docs
# Ref: http://docs.mongodb.org/master/tutorial/install-mongodb-on-ubuntu/

# Import the public key used by the package management system.
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

# Create the /etc/apt/sources.list.d/mongodb-org-3.0.list list file
RUN echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

# Reload local package database.
RUN apt-get update

# Install the MongoDB packages.
RUN apt-get install -y mongodb-org

# Create the default data directory
RUN mkdir -p /data/db

##################### INSTALLATION END #####################

# Expose the default port
EXPOSE 27017

# Default port to execute the entrypoint (MongoDB)
CMD ["mongod", "--smallfiles"]

# Set default container command
# ENTRYPOINT /usr/bin/mongod
Docker Pull Command
Owner
liudonghua123

Comments (0)