tag:help.appveyor.com,2012-11-13:/discussions/problems/27493-connecting-to-mongodb-from-a-docker-containerAppVeyor: Discussion 2020-06-06T01:05:36Ztag:help.appveyor.com,2012-11-13:Comment/483864502020-06-05T23:53:01Z2020-06-05T23:53:01ZConnecting to MongoDB from a Docker container<div><p>Hi David,</p>
<p>Mongo is not started by default. Start it with:</p>
<pre>
<code>net start MongoDB</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/483864502020-06-06T00:45:17Z2020-06-06T00:45:17ZConnecting to MongoDB from a Docker container<div><p>It's bound to <code>127.0.0.1:27017</code>, so it couldn't be accessed from a container unless configured to listen on all IPs: <a href="https://ci.appveyor.com/project/FeodorFitsner/simple-console#L21">https://ci.appveyor.com/project/FeodorFitsner/simple-console#L21</a></p>
<p>I'm changing the config and starting Mongo with this simple PS snippet:</p>
<pre>
<code>Add-Content -Path C:\MongoDB\mongod.cfg -Value "net:`n bindIpAll: true"
Start-Service mongodb</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/483864502020-06-06T01:05:36Z2020-06-06T01:05:36ZConnecting to MongoDB from a Docker container<div><p>still no luck for me, but I got mongo to work in docker which is even better because I can control the version of docker. Thanks for your help.</p></div>david