1 min readJun 4, 2019
Hi Issac, the mongod process should not be running as root if started with “docker run … mongo:4.0”. What result do you get for a “ps aux | grep mongo” on your host ? If you use the USER instruction in the Dockerfile or the -u flag on command line, the result is not the same as with gosu. Using gosu allows to do “root” stuff when the container is started and then to fall back to a non root user for the main (mongod) process. I hope this helps.