title: Docker: change port binding on an already created container with no data loss
body: <p>Assuming that I have a <code>MongoDb</code> or <code>Sql Server</code> container with a lotta data, and all of a sudden (which is very probable) I need to change the port! Maybe due to a sudden security issue! And I need to stop the container and start it up again running on a different port. Why doesn't docker allow me to do that, if I run the image again a new container will be created with no data inside and that causes a lot of mess. </p>
  
  <p>Is there a proper built-in solution? By proper I mean a solution that does not require me to back up databases, move them to out the container volume and restore them again. Something logical such as a <strong>command</strong> that can allow me to change the forwarded port, for example <code>-p 1433:1234 to 27017:1234</code>.</p>