Docker Compose Change the UID

According to the documentation, Graylog within the official Docker container seems to be hard-coded to run with user ID 1100. This means it doesn’t respect the user: field in docker-compose 3.x or anything else and means it can’t use persistent data set as another user ID as a result. This behavior, if hard-coded, is very inconsistent with most docker images.

I’ve tried all the usual docker methods with environmental variables, which goes as far as letting it create the directory structure but then Graylog itself can’t access it. It looks like this is the culprit in the actual docker image:


I’ve tried overwriting these with environment variables in the compose file but no luck. Is the UID actually hard-coded or is there some way to change it?

What’s your use case, why do you want to override it?

The use case I am trying to enable is having the mounted volumes for persistent data be owned by a different UID:GUID than 1100:1100, specifically the ones running docker.

Its not Docker best practice to hard code environmental variables especially the UIDs/GIDs like the official Graylog Docker image does.

When you try to manually set them the Docker container itself is happy but the way the image is set up with the hardcoded environmental variables overrides it. What should happen instead is that the container runs as the user who runs it, otherwise it should take the appropriate command line switches or the environment variables set in the docker-compose.yml file.

All that needs to happen is to remove the three lines from the image and advise the user in the docs to set the variables appropriately if they need to.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.