Merge pull request #9437 from cpuguy83/set_rlimits_in_container

Allow setting ulimits for containers
Upstream-commit: df7ba57f5f962b1a2d2e267a89ae465541a92371
Component: engine
This commit is contained in:
Jessie Frazelle
2015-03-04 04:00:17 -08:00
16 changed files with 365 additions and 10 deletions

View File

@ -51,6 +51,12 @@ You can still call an old version of the API using
**New!**
This endpoint now returns `Os`, `Arch` and `KernelVersion`.
`POST /containers/create`
`POST /containers/(id)/start`
**New!**
You can set ulimit settings to be used within the container.
## v1.17
### Full Documentation
@ -86,7 +92,6 @@ root filesystem as read only.
**New!**
This endpoint returns a live stream of a container's resource usage statistics.
## v1.16
### Full Documentation

View File

@ -155,7 +155,8 @@ Create a container
"CapDrop": ["MKNOD"],
"RestartPolicy": { "Name": "", "MaximumRetryCount": 0 },
"NetworkMode": "bridge",
"Devices": []
"Devices": [],
"Ulimits": [{}]
}
}
@ -244,6 +245,9 @@ Json Parameters:
- **Devices** - A list of devices to add to the container specified in the
form
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
- **Ulimits** - A list of ulimits to be set in the container, specified as
`{ "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }`, for example:
`Ulimits: { "Name": "nofile", "Soft": 1024, "Hard", 2048 }}`
Query Parameters:
@ -337,7 +341,8 @@ Return low-level information on the container `id`
"Name": "on-failure"
},
"SecurityOpt": null,
"VolumesFrom": null
"VolumesFrom": null,
"Ulimits": [{}]
},
"HostnamePath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname",
"HostsPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts",