Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker image to run an out of the box MongoDB.
Full Description

partlab/ubuntu-mongodb

Docker image to run an out of the box MongoDB.

Usage

Build

$ docker build -t partlab/ubuntu-mongodb .

Download automated build

$ docker pull partlab/ubuntu-mongodb

Running the MongoDB server

$ docker run -d -p 27017:27017 -p 28017:28017 --name mongodb partlab/ubuntu-mongodb

Running the MongoDB server with persistent directory

$ docker run -d -p 27017:27017 -p 28017:28017 --name mongodb -v <data-dir>/db:/var/lib/mongodb partlab/ubuntu-mongodb

Tips

VirtualBox (boot2docker-vm)

$ boot2docker halt
$ VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port27017,tcp,,27017,,27017"
$ VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port28017,tcp,,28017,,28017"
$ boot2docker up
Docker Pull Command
Owner
partlab
Source Repository