User ID Valid Range
From the CloudPak certification requirments, the uid for non-root user in container should be set in a higher range. We change it from 1000 to 100321000 but the image build got stuck and failed.
The reason is there is a range for uid number, it’s described in /etc/login.defs file (you can edit this file).
1 | cat /etc/login.defs | grep -i UID |
So if you create a user by useradd without specify user id explicitly, its uid will start from 1000. Also when change the uid by usermod -u <new uid> <user name>, you need to follow the limitation.
The gid has the same restriction:
1 | cat /etc/login.defs | grep -i GID |