title: How to persist MongoDB data between container restarts?
body: <p>It is quite easy to run MongoDB containerised using docker. Though each time you start a new mongodb container, you will get new empty database.</p>
  
  <p>What should I do in order to keep the database content between container restarts? I tried to bind external directory to container using -v option but without any success.</p>