update UID to 11001 to avoid potential UID collision with host users #220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This merge request updates the container user ID (UID) from 1001 to 11001. The primary goal is to make the images fault-tolerant by default, ensuring they run safely even on host systems that are not specifically hardened for container security.
Problem & Rationale
On many Linux distributions, the first non-root user created on the system is assigned UID 1000 or 1001. When a container is run with a user that has the same UID as a host user, any files created in a mounted volume by the container user will appear to be owned by the host user, and vice versa.
This UID collision can lead to:
Solution
To mitigate this, the UID for the container user has been changed to 11001. This is a higher, less commonly used UID, which significantly reduces the probability of a conflict with an existing user on the host machine. The change has been applied consistently across all Dockerfiles that define a user.
Impact
This update is a best practice for containerisation and will improve the overall robustness of the project's Docker setup.
Thank you for your consideration.