title: MongoDB in a Docker Container
body: <p>I am trying to run mongodb in a container. I am also trying move the data file into a volume, so that I can keep my data even after I stop the container. The problem happens when I try to run the image.
  I need to point mongodb to a new config file when starting it. For this I use</p>
  <pre><code>ENTRYPOINT mongod --config /mongo_data/configuraton/mongod.conf
  </code></pre>
  <p>But the container exits immediately.</p>
  <p>On the other hand, if I just write</p>
  <pre><code>ENTRYPOINT mongod 
  </code></pre>
  <p>it works fine. Any idea?</p>
  <p>This is my dockerfile from which I've build the image</p>
  <pre><code>FROM mongo
  
  RUN apt-get update
  RUN apt-get install nano
  
  VOLUME /mongo_data
  
  ENTRYPOINT mongod --config /mongo_data/configuraton/mongod.conf
  </code></pre>