Create new MongoDB instance based on existing data

i want to dockerize my production application. I’ve got MongoDB set up on server and I want to remove it, and make a docker container with MongoDB which will work on existing data. I already tested this approach, so i created a docker container which storage is pointed to host storage with existing data. Basically it’s the new MongoDB instance which work on data created by previous mongoDB which existed on Host. And it works, so i can query data, my application can connect to this database and so on. My question is, what are the threats to this approach? And if this is even good approach, or when i created new mongoDB instance should i import dump data from previous one ?

  • Error running docker container: No space left on device: “/data/db/journal”
  • Docker containers keep losing internet
  • Bluemix scalable container group custom domain SSL certificate
  • Docker - check private registry image version
  • TCP receives packets, but it ignores them
  • Docker-compose Kubernetes ENV properties interoperability
  • I can't connect to Rabbitmq server port 5672
  • Docker - proxy container port on host
  • Running Drupal in Docker container
  • docker with device-mapper and luks
  • Couchbase running in a container not accessible
  • How can I use XDebug with a PHP upstream behind an nginx reverse proxy?
  • One Solution collect form web for “Create new MongoDB instance based on existing data”

    I guess there’s no right and wrong in this case. It depends on how you want to have it working.

    Let’s say you left Mongodb running in the cloud.

    Is it a development database? If yes, how would you keep coding / testing without access to that?

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.