I have an percona/percona-server-mongodb image of mongo. I tried to mount my mongod.conf.
How to set config and run mongo with config file?
docker run --name mongo1 -v /opt/mongo/mongod3.conf:/etc/mongod.conf -d percona/percona-server-mongodb
I have an percona/percona-server-mongodb image of mongo. I tried to mount my mongod.conf.
How to set config and run mongo with config file?
docker run --name mongo1 -v /opt/mongo/mongod3.conf:/etc/mongod.conf -d percona/percona-server-mongodb
Very nearly there, just need to add “--config /etc/mongod.conf” to tell Percona Server for MongoDB to use your config file (mapped to /etc/mongod.conf) - the full command you need is here:
docker run --name mongo1 -v /opt/mongo/mongod3.conf:/etc/mongod.conf -d percona/percona-server-mongodb --config /etc/mongod.conf
For info: I work for Percona