> docker run --rm --name psmdb -e MONGO_INITDB_ROOT_USERNAME_FILE=/var/run/secrets/user -e MONGO_INITDB_ROOT_PASSWORD_FILE=/var/run/secrets/pass -e MONGO_INITDB_DATABASE=test -v /home/favas/percona-mongo/secrets:/var/run/secrets -v /home/favas/percona-mongo/mongod.conf:/etc/mongod.conf percona/percona-server-mongodb:4.4 --config=/etc/mongod.conf
> parse error: Invalid numeric literal at line 2, column 6
> parse error: Invalid numeric literal at line 2, column 6
> Unrecognized option: t.$date
> try 'mongod --help' for more information
Custom mongod.conf
> # mongod.conf, Percona Server for MongoDB
> # for documentation of all options, see:
> # http://docs.mongodb.org/manual/reference/configuration-options/
>
> # Where and how to store data.
> storage:
> dbPath: /var/lib/mongodb
> journal:
> enabled: true
> # engine: wiredTiger
> # engine: inMemory
>
> # Storage engine various options
> # More info for wiredTiger: https://docs.mongodb.com/v4.4/reference/configuration-options/#storage-wiredtiger-options
> # wiredTiger:
> # engineConfig:
> # cacheSizeGB: 1
> # checkpointSizeMB: 1000
> # statisticsLogDelaySecs: 0
> # journalCompressor: snappy
> # directoryForIndexes: false
> # collectionConfig:
> # blockCompressor: snappy
> # indexConfig:
> # prefixCompression: true
>
> # More info for inMemory: https://www.percona.com/doc/percona-server-for-mongodb/4.4/inmemory.html#configuring-percona-memory-engine
> # inMemory:
> # engineConfig:
> # inMemorySizeGB: 1
> # statisticsLogDelaySecs: 0
# Two options below can be used for wiredTiger and inMemory storage engines
#setParameter:
# wiredTigerConcurrentReadTransactions: 128
# wiredTigerConcurrentWriteTransactions: 128
# where to write logging data.
#systemLog:
# destination: file
# logAppend: true
# path: /var/log/mongo/mongod.log
processManagement:
fork: true
pidFilePath: /var/run/mongod.pid
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
I want to run the docker image with the custom configuration . currently i am adjusting by changing the CMD entry to this so that i can use the below dbpath in dockerfile
CMD [“mongod”, “–dbpath”, “/var/lib/mongod”]