I pretty new with dockers and started to play with it during my last project. I have a MongoDB container which I wish to move between some machines during the development.
I have some questions regards it-
Is there an option to copy-paste all the DB data? Mean that when I copy the image container I will be able to copy the DB's data as well? I tried to copy the related directory on my machine but it wasn't worked well (copying the host directory in
-v host_directory:container_directory
)Is there a way that I can create a
Dockerfile
that builds a mongo image and configures the DB? Such as set a new admin user, create DBs - so when I build the docker image all the settings and schemes will be the same?
Thanks ahead!