Skip to content
Projets

À propos

MongoDB Dockerfile for trusted automated Docker builds.

Systèmes et infrastructure

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

MongoDB Dockerfile

This repository contains Dockerfile of MongoDB for Docker's automated build published to the public Docker Hub Registry.

Base Docker Image

Installation

  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull dockerfile/mongodb

    (alternatively, you can build an image from Dockerfile: docker build -t="dockerfile/mongodb" github.com/dockerfile/mongodb)

Usage

Run mongod

docker run -d -p 27017:27017 --name mongodb dockerfile/mongodb

Run mongod w/ persistent/shared directory

docker run -d -p 27017:27017 -v <db-dir>:/data/db --name mongodb dockerfile/mongodb

Run mongod w/ HTTP support

docker run -d -p 27017:27017 -p 28017:28017 --name mongodb dockerfile/mongodb mongod --rest --httpinterface

Run mongod w/ Smaller default file size

docker run -d -p 27017:27017 --name mongodb dockerfile/mongodb mongod --smallfiles

Run mongo

docker run -it --rm --link mongodb:mongodb dockerfile/mongodb bash -c 'mongo --host mongodb'
Usage with VirtualBox (boot2docker-vm)

You will need to set up nat port forwarding with:

VBoxManage modifyvm "boot2docker-vm" --natpf1 "guestmongodb,tcp,127.0.0.1,27017,,27017"

This will allow you to connect to your mongo container with the standard mongo commands.

Explorer des projets similaires

Chargement…