I'm building my own image on top of docker.io/mongo:3.2
, but I have a problem with persisting some changes (creating new users) in the build process.
I'm aware that this happens because the users are created in the /data/db
, which is defined as VOLUME
in the original MongoDB Dockerfile.
My question is if there is a way I can add users during the build process and make those changes persist the build process.
Alternatively, if that isn't possible, how can I add the DB users during the build process of my image?