I am unable to enable security parameter at docker of mongodb at mongod.conf file. So how can I configure any parameter at mongod.conf file?

I found a file inside mongodb container named it as mongod.conf.ori but where it actually configured I did not understan?

I need expert opinion who already worked on it. Please suggest me.

1 Answer 1


There is two different solutions to this problem. If you look here at section configuration.

You can configure things with command line parameters OR you can mount some volume to that container, have config file there and just using -f parameter, point your mongod to that file.

Command docker run -it --rm mongo --help will give you more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.