title: How to create a MongoDB docker and save the DB's configuration?
body: <p>I pretty new with dockers and started to play with it during my last project.
  I have a MongoDB container which I wish to move between some machines during the development. </p>
  
  <p>I have some questions regards it-</p>
  
  <ol>
  <li><p>Is there an option to copy-paste all the DB data? Mean that when I copy the image container I will be able to copy the DB's data as well? I tried to copy the related directory on my machine but it wasn't worked well (copying the host directory in <code>-v host_directory:container_directory</code>)</p></li>
  <li><p>Is there a way that I can create a <code>Dockerfile</code> that builds a mongo image and configures the DB? Such as set a new admin user, create DBs - so when I build the docker image all the settings and schemes will be the same?</p></li>
  </ol>
  
  <p>Thanks ahead!</p>