Docker Community Forums

Share and learn in the Docker community.

Deploying Mongo replica sets between real and dockerized instances

I’m a newbie to Docker, so maybe there is a straightforward answer to this at some link I couldn’t find.

I was wondering if it would be feasible to connect two docker containers with a real mongo instance.

I really would like to synch a 450GB db from a remote host with replica sets running on my containers located on another physical server. I created a dockerized version of the original application with a smaller dump of the original database and I’m very happy with it. Now it’s time to think about moving the original database.

I already had some good hint on how to set replica set between different containers from this question on stackoverflow, but now I’m really not sure about the path to follow.

At the very beginning I wanted to dump the original database and restore it into new instances, but there are cron jobs running scripts regularly to update the original one. I would like to avoid having a gap into data collection.

I’d like in general to understand the best practice for this big “moving”.

Not sure it might be useful to know, but we have now access through VPN to this db for the moment.

What is your question exactly?