Skip to content

Build MongoDB Docker-Image with custom UID/GID

Notifications You must be signed in to change notification settings

superstes/docker-mongodb-uid

Repository files navigation

Docker MongoDB

This repo shows how to re-build the official MonogDB image to use a custom UID + GID.

That can be useful if you need data-persistence (using a volume) and want to map a host-user to the user being used by the container.

The default image uses the hardcoded UID/GID 999..

Options covered here