build fails when existing user or group is provided as build arg
sebfisch opened this issue · comments
Sebastian Fischer commented
The Dockerfile
respects build args for the name and IDs of the created user and their initial group. There is no check if the name or ID of of a given user or group already exists, which leads to an error when building the container image, for example when passing staff
as GROUP
.
The expected behaviour is as follows:
- When
root
is provided asUSER
, no new group and no new user is created. - When the provided
UID
already exists (equalsroot
s ID0
) the default value forUID
is used. - When
GID
already exists, no new group is created. - When
GROUP
already exists,USER
is used as value forGROUP
.