Hi everyone I got a problem needed to be solved:
I'd like to connect to mongo db which is built in container.
process:
1. I build mongo constructed by official, but version is 2.4.9. the attachment is my dockerfile
2. Everytime, I run container I need to do "sudo service mongodb restart"(this is part I still get why?)
3. After that mongo is set
4. edit /etc/mongodb.conf file, based on internet information, modify bind_ip = container i address from ifconfig , port=27017
5. mongo "container ip address" , failed.
bug informed
Error: couldn't connect to server x.x.x.x:27017 (x.x.x.x), connection attempt failed
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181
hope everyone could help!
thx very much!