Not the answer you need?
Register and ask your own question!

proper way to pass a mongod.conf file to percona/percona-server-mongodb container?

spiffly423spiffly423 EntrantCurrent User Role Supporter
I'd like to supply a mongod.conf file to a container running the percona/percona-server-mongodb image. I've tried building my own image from said image where I inject the mongod.conf file:

FROM percona/percona-server-mongodb

COPY --chown=0:0 conf/mongod.conf /etc/mongod.conf
***end Dockerfile***

But when I then run this image I get the following:

$ docker run -d myImage -f /etc/mongod.conf
+ exec mongod -f /etc/mongod.conf --sslMode disabled --bind_ip_all
BadValue: need to enable SSL via the sslMode flag when using SSL configuration parameters it looks like it's ignoring the file and executing a hard-coded fallback command, like an entrypoint in the original image or something.

I can add --sslMode=requireSSL to the end of the docker run command, which allows it to then start up, but it's obvious it's still ignoring my mongod.conf file since it gives wiredtiger status lines and my conf specifies to use inMemory.

Am I going about this the wrong way? What is the proper way to supply a mongod.conf to the image on startup?

Also, can the original image files, such as the Dockerfile, for percona-server-mongodb be found in a repo somewhere? it would be helpful to take a look.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.