Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added edit /etc/subgid section #199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions sites/cheerpx/src/content/docs/11-guides/custom-images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
<username>:<start_id>:<count>
```

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).
Loading