title: Docker container mongod error when starting via ssh
body: <p>I have installed mongodb on a docker container together with openssh on ubuntu 14.04. The container is running with ssh but when I ssh into the container I get the following error when trying to start mongod.</p>
  
  <pre><code>root@430f9502ba2d:~# service mongod start
  Rather than invoking init scripts through /etc/init.d, use the service(8)
  utility, e.g. service mongod start
  
  Since the script you are attempting to invoke has been converted to an
  Upstart job, you may also use the start(8) utility, e.g. start mongod
  </code></pre>
  
  <p>Also <code>start mongod</code> does not affect anything.</p>
  
  <p>Tried looking at this also <a href="https://stackoverflow.com/questions/25271077/mongo-daemon-doesnt-run-by-service-mongod-start?rq=1">Mongo daemon doesn&#39;t run by service mongod start</a> without it helping.</p>
  
  <p><code>mongod --config /your/path/to/mongod.conf</code> doesn't seem to work also, just locks up.</p>
  
  <p>The error below is standard as of course there is no mongod server running.</p>
  
  <pre><code>root@430f9502ba2d:/# mongo
  MongoDB shell version: 2.6.9
  connecting to: test
  2015-05-07T20:49:56.213+0000 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
  2015-05-07T20:49:56.214+0000 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
  exception: connect failed
  </code></pre>