mirror of https://github.com/docker/cli.git
Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
9574a12bad
commit
d20a7f0d85
|
@ -109,6 +109,7 @@ expect an integer, and they can only be specified once.
|
||||||
--tlskey="~/.docker/key.pem" Path to TLS key file
|
--tlskey="~/.docker/key.pem" Path to TLS key file
|
||||||
--tlsverify=false Use TLS and verify the remote
|
--tlsverify=false Use TLS and verify the remote
|
||||||
-v, --version=false Print version information and quit
|
-v, --version=false Print version information and quit
|
||||||
|
--default-ulimit=[] Set default ulimit settings for containers.
|
||||||
|
|
||||||
Options with [] may be specified multiple times.
|
Options with [] may be specified multiple times.
|
||||||
|
|
||||||
|
@ -404,6 +405,14 @@ This will only add the proxy and authentication to the Docker daemon's requests
|
||||||
your `docker build`s and running containers will need extra configuration to use
|
your `docker build`s and running containers will need extra configuration to use
|
||||||
the proxy
|
the proxy
|
||||||
|
|
||||||
|
### Default Ulimits
|
||||||
|
|
||||||
|
`--default-ulimit` allows you to set the default `ulimit` options to use for all
|
||||||
|
containers. It takes the same options as `--ulimit` for `docker run`. If these
|
||||||
|
defaults are not set, `ulimit` settings will be inheritted, if not set on
|
||||||
|
`docker run`, from the Docker daemon. Any `--ulimit` options passed to
|
||||||
|
`docker run` will overwrite these defaults.
|
||||||
|
|
||||||
### Miscellaneous options
|
### Miscellaneous options
|
||||||
|
|
||||||
IP masquerading uses address translation to allow containers without a public IP to talk
|
IP masquerading uses address translation to allow containers without a public IP to talk
|
||||||
|
@ -1988,6 +1997,23 @@ For IPv6 use the `-6` flag instead of the `-4` flag. For other network
|
||||||
devices, replace `eth0` with the correct device name (for example `docker0`
|
devices, replace `eth0` with the correct device name (for example `docker0`
|
||||||
for the bridge device).
|
for the bridge device).
|
||||||
|
|
||||||
|
### Setting ulimits in a container
|
||||||
|
|
||||||
|
Since setting `ulimit` settings in a container requires extra privileges not
|
||||||
|
available in the default container, you can set these using the `--ulimit` flag.
|
||||||
|
`--ulimit` is specified with a soft and hard limit as such:
|
||||||
|
`<type>=<soft limit>[:<hard limit>]`, for example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker run --ulimit nofile=1024:1024 --rm debian ulimit -n
|
||||||
|
1024
|
||||||
|
```
|
||||||
|
|
||||||
|
>**Note:**
|
||||||
|
> If you do not provide a `hard limit`, the `soft limit` will be used for both
|
||||||
|
values. If no `ulimits` are set, they will be inherited from the default `ulimits`
|
||||||
|
set on the daemon.
|
||||||
|
|
||||||
## save
|
## save
|
||||||
|
|
||||||
Usage: docker save [OPTIONS] IMAGE [IMAGE...]
|
Usage: docker save [OPTIONS] IMAGE [IMAGE...]
|
||||||
|
|
Loading…
Reference in New Issue