DEV Community

Discussion on: Adventure with Docker: Conflicts with UIDs of the container and the host

Collapse
 
gangefors profile image
Stefan Gangefors • Edited

I usually never put new users into the dockerfile, instead I try to solve it by starting the container using the "--user/--group" options and chown everything in the exposed volumes in a startup script. Using this approach you can use any ids you want (just make sure that containers with shared data use the same ids).
But when using published images that you have no control over it's not always possible.

Note:
It seems that the latest official ES image uses udi/gid 1000/1000 now.
elastic.co/guide/en/elasticsearch/...