I am trying to do in one command, do a bash from docker container, open mongo and make a request with something like
'db.test.find({});'
I am reading from others similar post without success.
This is the command that I am executing.
docker exec -it mongoDB bash -c 'mongo ; use test; db.test.find({})'
And that command give me that
bash: -c: line 0: syntax error near unexpected token {}'
bash: -c: line 0:mongo ; use test; db.test.find({})'
It is that possible?
I hope that you can help me.
Regards,
Roth.