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 ?

  • Docker build has no network, but docker run has
  • How to deploy docker file on other server
  • Can't connect with BOLT to a docker Neo4j
  • Why does my AWS ECS task require docker api 1.18?
  • How to integrate spark cluster with other Hadoop2.x cluster on Docker
  • docker status “Restating” forever
  • CircleCI './docker-compose.yml' service 'version' doesn't have any configuration options
  • How to Setup a Docker Tomcat Container on Mac OS X
  • How can I understand the role of “/bin/true” command in “docker run …” command?
  • Elasticsearch deployment on google app engine flex
  • Docker neo4j container just hangs
  • Docker start privileged?
  • 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.