CLI flag for docker create(run) to change block device size.

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
This commit is contained in:
Shishir Mahajan
2016-03-20 00:42:58 -04:00
parent 35986d4824
commit b16decfccf
30 changed files with 228 additions and 72 deletions

View File

@@ -116,6 +116,8 @@ This section lists each version from latest to oldest. Each listing includes a
[Docker Remote API v1.24](docker_remote_api_v1.24.md) documentation
* `POST /containers/create` now takes `StorageOpt` field.
### v1.23 API changes
[Docker Remote API v1.23](docker_remote_api_v1.23.md) documentation

View File

@@ -325,6 +325,7 @@ Create a container
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"StorageOpt": {},
"CgroupParent": "",
"VolumeDriver": "",
"ShmSize": 67108864
@@ -444,6 +445,8 @@ Json Parameters:
`Ulimits: { "Name": "nofile", "Soft": 1024, "Hard": 2048 }`
- **SecurityOpt**: A list of string values to customize labels for MLS
systems, such as SELinux.
- **StorageOpt**: Storage driver options per container. Options can be passed in the form
`{"size":"120G"}`
- **LogConfig** - Log configuration for the container, specified as a JSON object in the form
`{ "Type": "<driver_name>", "Config": {"key1": "val1"}}`.
Available types: `json-file`, `syslog`, `journald`, `gelf`, `fluentd`, `awslogs`, `splunk`, `etwlogs`, `none`.
@@ -568,6 +571,7 @@ Return low-level information on the container `id`
"Type": "json-file"
},
"SecurityOpt": null,
"StorageOpt": null,
"VolumesFrom": null,
"Ulimits": [{}],
"VolumeDriver": "",

View File

@@ -81,6 +81,7 @@ Creates a new container.
--security-opt=[] Security options
--stop-signal="SIGTERM" Signal to stop a container
--shm-size=[] Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`.
--storage-opt=[] Set storage driver options per container
-t, --tty Allocate a pseudo-TTY
-u, --user="" Username or UID
--userns="" Container user namespace
@@ -145,6 +146,13 @@ then be used from the subsequent container:
drwx--S--- 2 1000 staff 460 Dec 5 00:51 .ssh
drwxr-xr-x 32 1000 staff 1140 Dec 5 04:01 docker
Set storage driver options per container.
$ docker create -it --storage-opt size=120G fedora /bin/bash
This (size) will allow to set the container rootfs size to 120G at creation time.
User cannot pass a size less than the Default BaseFS Size.
### Specify isolation technology for container (--isolation)
This option is useful in situations where you are running Docker containers on

View File

@@ -83,6 +83,7 @@ parent = "smn_cli"
--security-opt=[] Security Options
--sig-proxy=true Proxy received signals to the process
--stop-signal="SIGTERM" Signal to stop a container
--storage-opt=[] Set storage driver options per container
-t, --tty Allocate a pseudo-TTY
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>])
--userns="" Container user namespace
@@ -167,6 +168,13 @@ flag exists to allow special use-cases, like running Docker within Docker.
The `-w` lets the command being executed inside directory given, here
`/path/to/dir/`. If the path does not exists it is created inside the container.
### Set storage driver options per container
$ docker create -it --storage-opt size=120G fedora /bin/bash
This (size) will allow to set the container rootfs size to 120G at creation time.
User cannot pass a size less than the Default BaseFS Size.
### Mount tmpfs (--tmpfs)
$ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image