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
@@ -206,6 +206,43 @@ A container joins an existing [UTS namespace](config-linux.md#namespaces) on Lin
206
206
207
207
When the example container is deleted, neither removing the preexisting UTS namespace nor undoing the hostname change are allowed.
208
208
209
+
##### Joining cgroups (Linux)
210
+
211
+
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):
212
+
213
+
```json
214
+
{
215
+
"ociVersion": "1.0.0-rc3",
216
+
"platform": {
217
+
"os": "linux",
218
+
"arch": "amd64"
219
+
},
220
+
"process": {
221
+
"cwd": "/",
222
+
"args": [
223
+
"sh"
224
+
],
225
+
"user": {
226
+
"uid": 1,
227
+
"gid": 1
228
+
}
229
+
},
230
+
"root": {
231
+
"path": "rootfs"
232
+
},
233
+
"linux": {
234
+
"cgroupsPath": "/some/existing/container",
235
+
"resources": {
236
+
"memory": {
237
+
"limit": 100000
238
+
}
239
+
}
240
+
}
241
+
}
242
+
```
243
+
244
+
When the example container is deleted, neither removing the preexisting cgroup not undoing the memory limit change are allowed.
245
+
209
246
## Hooks
210
247
Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation.
211
248
See [runtime configuration for hooks](./config.md#hooks) for more information.
0 commit comments