Based on davybello/mongo-replica-set. Ubuntu 20.04 and MongoDB 4.4.9, db ports: 27011, 27012, 27013
481
A Replica Set of MongoDB (v.4.4.9) running in a Ubuntu-based Docker container
The key motivation for this image is to have a ready-made replica set of MongoDB running inside docker container for CI tests.
To run the container, execute the following command:
docker run --name mongo-replica-set -d -p 27011:27011 -p 27012:27012 -p 27013:27013 northwestwitch/mongo4.4-replica-set
Wait for 30 to 35 seconds in order to properly start all database instances and replica-set initialization.
Once ready, the replica-set can be accessed using the following connection string:
mongodb://localhost:27011,localhost:27012,localhost:27013/?replicaSet=rs0&readPreference=primary&ssl=false
Content type
Image
Digest
Size
125.8 MB
Last updated
almost 5 years ago
docker pull northwestwitch/mongo4.4-replica-set