diff --git a/sites/cheerpx/src/content/docs/11-guides/custom-images.mdx b/sites/cheerpx/src/content/docs/11-guides/custom-images.mdx index d23e6a08..f390700d 100644 --- a/sites/cheerpx/src/content/docs/11-guides/custom-images.mdx +++ b/sites/cheerpx/src/content/docs/11-guides/custom-images.mdx @@ -81,3 +81,45 @@ Remove temporary directories: ```bash rm -rf cheerpXFS ``` + +## Edit `/etc/subgid` (for the host user) + +The `/etc/subgid` file defines which ranges of subordinate group IDs are allocated to specific user accounts on the host for managing user namespaces in containers. This file needs to be configured for the host user running container commands to ensure proper namespace mapping and avoid conflicts. + +### 1. Identify your host user + +Run the following command to determine the host user running container commands: + +```bash +whoami +``` + +### 2. Check `/etc/subgid` for your user + +Open `/etc/subgid` and look for an entry matching your user: + +```bash +sudo nano /etc/subgid +``` + +The file should contain lines in the format: + +``` +:: +``` + +For example, for the user `johndoe`: + +``` +johndoe:100000:65536 +``` + +### 3. Modify the file + +If you need to change the `subgid` range for the host user, modify the `start_id` and/or `count` as needed. For example, if you want to assign a new range starting at 200000 with a count of 65536, you would change it to: + +``` +johndoe:200000:65536 +``` + +For more information about `subgid`, refer to the [subgid documententation](https://man7.org/linux/man-pages/man5/subgid.5.html).