UID in docker and host are different


Maybe someone make clear for me. Is there dependency of users (UID) from host and container?

I have the running nginx with 101 UID=nginx on the container.

But host has another user for this UID 101=syslog. And top on host show that the running nginx from syslog

root@c11b2741a274:/# cat /etc/passwd | grep 101
nginx:x:101:101:nginx user,:/nonexistent:/bin/false

root@docker-01:/home/docker# cat /etc/passwd | grep 101

2066 syslog 20 0 2097272 1.775g 1936 S 0.3 15.1 3:16.27 nginx-debug

The view of owner procees is wrong,. Is this only incorrect view.

  • Is it has the influence on the process? For example system limits for users, etc.
  • What is the best practice for the creating users with docker?

Ubuntu 14.04.5 LTS (3.16)
Docker version 17.09.0-ce