Unable to run mongodb as a daemon process

I am running docker on windows with the docker-machine and Docker Toolbox installation package.

Boot2Docker is now deprecated, btw.

The docs here: https://docs.docker.com/examples/mongodb/ told me to connect to the running mongodb container like:

$ mongo --port 27017 --host
But I get this error:

$ mongo --host
sh: mongo: command not found
Any ideas?

EDIT 1: I run the container like this:

$ docker run -p 27017:27017 --name mongodb -d myname/repo


This looks like a UNIX problem.

Where is mongo installed? Is the /bin in your PATH?

Confirm that it is, and then try.


Yeah, look like you have to check if you at-least have mongo client installed on your docker host. If yes check whether it has execute permission and in PATH ENV.

@dolphyvn @sapjpp ahh I see, I have to add it to my path. Thanks to both of you.