mongodb - ENTRYPOINT & CMD commands with mongod results in unknown option error -



mongodb - ENTRYPOINT & CMD commands with mongod results in unknown option error -

i using multiple dockerfiles setup server infrastructure. 1 of dockerfiles build mongodb server linked running web server application in later step. currently, have problem when running mongodb server receive next error:

"error parsing command line: unknown alternative port 27017"

in dockerfile have:

cmd ["--port 27017", "--dbpath /data/db", "--smallfiles"] entrypoint ["/usr/bin/mongod"]

when utilize instead of above commands next works:

cmd /usr/bin/mongod --port 27017 --dbpath /data/db --smallfiles

i prefer cmd - array , entrypoint approach more cannot figure out why receive error.

when using json syntax, need pass each argument individually. consider each element 1 whereas in non-json syntax, split shell , considered two.

cmd ["--port", "27017", "--dbpath", "/data/db", "--smallfiles"] work.

alternatively, don't know if mongo supports it, softwares does, this:

cmd ["--port=27017", "--dbpath=/data/db", "--smallfiles"] passed 1 element interpreted mongo.

mongodb docker boot2docker

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -