You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: runtime.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,43 @@ A container joins an existing [UTS namespace](config-linux.md#namespaces) on Lin
209
209
210
210
When the example container is deleted, neither removing the preexisting UTS namespace nor undoing the hostname change are allowed.
211
211
212
+
##### Joining cgroups (Linux)
213
+
214
+
A container joins an existing [cgroup](config-linux.md#control-groups) on Linux and changes a [memory limit](config.md#memory) with the following [configuration](config.md):
215
+
216
+
```json
217
+
{
218
+
"ociVersion": "1.0.0-rc3",
219
+
"platform": {
220
+
"os": "linux",
221
+
"arch": "amd64"
222
+
},
223
+
"process": {
224
+
"cwd": "/",
225
+
"args": [
226
+
"sh"
227
+
],
228
+
"user": {
229
+
"uid": 1,
230
+
"gid": 1
231
+
}
232
+
},
233
+
"root": {
234
+
"path": "rootfs"
235
+
},
236
+
"linux": {
237
+
"cgroupsPath": "/some/existing/container",
238
+
"resources": {
239
+
"memory": {
240
+
"limit": 100000
241
+
}
242
+
}
243
+
}
244
+
}
245
+
```
246
+
247
+
When the example container is deleted, neither removing the preexisting cgroup not undoing the memory limit change are allowed.
248
+
212
249
## Hooks
213
250
Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation.
214
251
See [runtime configuration for hooks](./config.md#hooks) for more information.
0 commit comments