0

I just downloaded Docker and created the MongoDB container on it.

I have successfully created the container and it is working on the port 168.192.99.100:32728 on my local machine. I'm confused how should I run mongo on my machine?

For example if we create the SQL container we can connect to the port using MySQL Workbench. How do i do something similar for Mongo?

1
  • "mongod" cmd should suffice Commented Jun 1, 2016 at 18:44

1 Answer 1

1

You have at least two options:

Running the mongo-client on your host-system (requires install of mongo-client):

mongo --host 168.192.99.100 --port 32728

see https://docs.mongodb.com/manual/reference/program/mongo/#bin.mongo

or maybe the simpler option of attaching to the docker-container with the running mongodb-server which already should have a mongo-client installed:

docker exec -it "name of container" mongo

https://docs.docker.com/engine/reference/commandline/exec/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.