Overview

In order to connect to docker, you should firstly know the name of the docker container. This can be obtained as follows:

So in order to connect we can simply execute the /bin/bash on the container:

File Migration with Mongo

Migration to and from the docker is done rather easily, even when you have to export a database or so:

Export collection

The export from Mongo is done via the standard utils like: mongoexport, but firstly we have to see our container:

Then we can connect to it as follows:

And then we can connect to the mongo, if we want to:

Export of the database, as said again, is done with the standard utils:

And then we can copy it to the main machine:

We can also perform couple operations like, exchange the BAC → DT

We can also remove the _id column as follows:

And we can take it back: