Skip to content

Commit 6362cc9

Browse files
authored
Merge pull request #25829 from locker95/docs/rootless-delegate-selectable
docs: make rootless cgroup delegate.conf copy-pasteable
2 parents 07ce908 + a20e358 commit 6362cc9

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

  • content/manuals/engine/security/rootless

content/manuals/engine/security/rootless/tips.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,23 @@ $ cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup
152152
memory pids
153153
```
154154

155-
To allow delegation of all controllers, you need to change the systemd configuration as follows:
155+
To allow delegation of all controllers, change the systemd configuration:
156156

157157
```console
158-
# mkdir -p /etc/systemd/system/user@.service.d
159-
# cat > /etc/systemd/system/user@.service.d/delegate.conf << EOF
158+
$ sudo mkdir -p /etc/systemd/system/user@.service.d
159+
```
160+
161+
Create `/etc/systemd/system/user@.service.d/delegate.conf`:
162+
163+
```ini
160164
[Service]
161165
Delegate=cpu cpuset io memory pids
162-
EOF
163-
# systemctl daemon-reload
166+
```
167+
168+
Then reload systemd:
169+
170+
```console
171+
$ sudo systemctl daemon-reload
164172
```
165173

166174
> [!NOTE]

0 commit comments

Comments
 (0)