1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/sources/examples/mongodb/Dockerfile
O.S.Tezer fd56723494 Rewrite and update the MongoDB service article
MongoDB article had some fundemental issues.

 - Outdated Dockerfile
 - Insufficient / unclear instructions
 - Unnecessary comments
 - Failed to explain the role of Docker.io
 - Did not have a complete Dockerfile sample
 - Lacked a "learn more" section / link to Trusted Builds

This update aims to address all these issues with a complete re-write.

It also:

 - Corrects the label under which this article is/was listed on the menu

Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)

 - First run at amending after the initial review process.
 - Make the Dockerfile generic.
 - Revision.
 - Fixes
2014-05-09 09:09:52 +01:00

24 lines
846 B
Docker

# Dockerizing MongoDB: Dockerfile for building MongoDB images
# Based on ubuntu:latest, installs MongoDB following the instructions from:
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
FROM ubuntu:latest
MAINTAINER Docker
# Installation:
# 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' | tee /etc/apt/sources.list.d/10gen.list
# Update apt-get sources AND install MongoDB
RUN apt-get update
RUN apt-get install -y -q mongodb-org
# Create the MongoDB data directory
RUN mkdir -p /data/db
# Expose port #27017 from the container to the host
EXPOSE 27017
# Set usr/bin/mongod as the dockerized entry-point application
ENTRYPOINT usr/bin/mongod