title: Import a Mongo Database into a Docker Container
body: <p>I have a <code>docker container</code> generated from a <code>docker image</code> which has <code>mongoDB</code> installed. I want to export a database from my local machine and import it into that <code>docker container</code>. </p>
  
  <p>What're the steps for that? </p>
  
  <p>I tried to export the whole db by <code>mongodump</code> and then copy the dump file into the container with  <code>docker cp</code>. But feels like that's not the correct way.</p>
  
  <p>Thanks in advance.</p>