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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user