Docker Repair | Remove ubuntu user to replace with crafty user
What does this MR do and why?
This Merge Request removes the default ubuntu
user (UID 1000) from our Ubuntu 24.04 base image and to use our custom non-root user (crafty
) with the correct UID and permissions.
-
Why? In Ubuntu 24.04, a default
ubuntu
user is created with UID 1000, which conflicts with our existing user creation process. This conflict prevented existing containers from accessing mounted files, causing a boot loop. By removing the shipped user and continuing to create our own, we ensure consistent UID assignments and restore functionality for both fresh and existing containers.
Screenshots or screen recordings
No UI changes; this MR affects container initialization and user permissions only.
How to set up and validate locally
-
Pull the MR branch:
git fetch git checkout devops/docker-image-user-repair
-
Build the Docker image:
cd docker docker compose up --build
-
Verify container logs:
- Ensure there are no permission errors or unexpected boot loops.
Once you confirm that the container starts and operates without permission issues, the fix is validated.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
Have you checked this doesn't interfere/conflict/duplicate someone elses work? -
Have you fully tested your changes? -
Have you resolved any lint issues? -
Have you assigned a reviewer? (Emergency Patch Override) -
Have you applied correct labels?
Edited by Iain Powrie