Forked from dockerfile/mongodb, but works on top of debian instead of Ubuntu. This makes for a slimmer Docker image.
This repository contains Dockerfile of MongoDB for Docker's automated build published to the public Docker Hub Registry.
debian
Install Docker.
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)
mongoddocker run -d -p 27017:27017 --name mongodb dockerfile/mongodb
mongod w/ persistent/shared directorydocker run -d -p 27017:27017 -v <db-dir>:/data/db --name mongodb dockerfile/mongodb
mongod w/ HTTP supportdocker run -d -p 27017:27017 -p 28017:28017 --name mongodb dockerfile/mongodb mongod --rest --httpinterface
mongod w/ Smaller default file sizedocker run -d -p 27017:27017 --name mongodb dockerfile/mongodb mongod --smallfiles
mongodocker run -it --rm --link mongodb:mongodb dockerfile/mongodb bash -c 'mongo --host mongodb'
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.
Content type
Image
Digest
sha256:6cdedb06d…
Size
128.4 MB
Last updated
almost 11 years ago
docker pull gregweber/mongodb