MongoDB in a container, with configurable replicaset settings! Run either a single MongoDB node or a full replicaset in a container.
1.8K
MongoDB in a container, with configurable replicaset settings! Run either a single MongoDB node or a full replicaset in a container.
This image is a quick and easy way to get set up with MongoDB in either single-node configuration, or with a replicaset. This is absolutely not intended for production use, but can be helpful when testing different Mongo configurations.
To start Mongo as a single node database server, just run:
docker run -d nickstenning/mongodb
To start a full replicaset, you can specify the REPLSETMEMBERS environment variable. You'll also probably need to open up more ports so you can access the other replicaset members.
docker run -d -e REPLSETMEMBERS=3 -p :27017 -p :27018 -p :27019 nickstenning/mongodb
Content type
Image
Digest
sha256:44784cebb…
Size
301 MB
Last updated
almost 11 years ago
docker pull nickstenning/mongodb