1
0
mirror of https://github.com/docker/docs.git synced 2026-10-28 07:15:09 +03:00

docs: make rootless cgroup delegate.conf copy-pasteable

Signed-off-by: Dean Chen <862469039@qq.com>
This commit is contained in:
Dean Chen
2026-08-14 08:37:27 +05:00
parent 92298b9c17
commit a20e3585fe

View File

@@ -152,15 +152,23 @@ $ cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup
memory pids
```
To allow delegation of all controllers, you need to change the systemd configuration as follows:
To allow delegation of all controllers, change the systemd configuration:
```console
# mkdir -p /etc/systemd/system/user@.service.d
# cat > /etc/systemd/system/user@.service.d/delegate.conf << EOF
$ sudo mkdir -p /etc/systemd/system/user@.service.d
```
Create `/etc/systemd/system/user@.service.d/delegate.conf`:
```ini
[Service]
Delegate=cpu cpuset io memory pids
EOF
# systemctl daemon-reload
```
Then reload systemd:
```console
$ sudo systemctl daemon-reload
```
> [!NOTE]