Anyone here available to help on this quest: How to create a Mongo Docker Image with default collections and data?
There is a volume defined in /db/data so that directory will not get saved in the resulting image (https://docs.docker.com/engine/userguide/dockervolumes/#data-volumes).
@yosifkit thanks for pointing this out. Was not aware of how volume works in Docker.
I will try to mount a different volume for my own db files.
Most helpful comment
There is a volume defined in
/db/dataso that directory will not get saved in the resulting image (https://docs.docker.com/engine/userguide/dockervolumes/#data-volumes).