3

I use containers (systemd-nspawn but I believe lxc will be similar) and from the perspective of the host, users in containers (including root) have specific UIDs, such as 3804364+.

Are these IDs allocated in a predictable way? I am particularly interested to understand if they are deterministic (a specific user in a specific container will always have the same UID, possibly after the first start of the container).

In other words, can I assume that user root in the container helloworld which is now seen as 3804364+ by the host will always be so? (after the container's or the host's reboot)

If not, is there a way to make such a mapping?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.