Fix Ubuntu 24.04 systemtest Docker user setup#772
Conversation
Reuse existing UID/GID entries in the Ubuntu 24.04 base image so the systemtest Docker build does not fail when GID 1000 already exists.
MakisH
left a comment
There was a problem hiding this comment.
Thanks for the fix! This is important for developing/debugging locally.
It runs on my system (Ubuntu 22.04, UID/GID=1000), and the changes make sense to me.
Since I need to get back into context, could you please elaborate on why this is an issue with the Ubuntu 24.04 builds, but not with the 22.04?
|
Thanks @MakisH for a check , the difference seems to come from the base images themselves. " ubuntu:24.04" already includes a default "ubuntu" user/group with UID/GID |

Summary
This fixes the Ubuntu 24.04 systemtest Docker build when the requested host UID/GID already exists inside the base image.
With "ubuntu:24.04", UID/GID
1000can already be used by the defaultubuntuuser/group. The previous Dockerfile always tried to create a newprecicegroup and user with those IDs, which failed with:groupadd: GID '1000' already exists
Changes
The Dockerfile now checks whether the requested group or user already exists:
Fixes System test Docker container for Ubuntu 24.04 fails in groupadd #766.
Both builds ran successfully
Checklist:
changelog-entries/<PRnumber>.md.