From d75f24fd9d0a1503625d21ad95cfd3d970146c71 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 28 Dec 2016 14:44:07 -0800 Subject: [PATCH] Update opts.MemBytes to disable default, and move `docker run/create/build` to use opts.MemBytes This fix made several updates: 1. Update opts.MemBytes so that default value will not show up. The reason is that in case a default value is decided by daemon, instead of client, we actually want to not show default value. 2. Move `docker run/create/build` to use opts.MemBytes for `--shm-size` This is to bring consistency between daemon and docker run 3. docs updates. Signed-off-by: Yong Tang --- docs/reference/commandline/build.md | 2 +- docs/reference/commandline/create.md | 2 +- docs/reference/commandline/run.md | 2 +- docs/reference/commandline/service_create.md | 4 ++-- docs/reference/commandline/service_update.md | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 2f8c59c387..5b6f1fec61 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -49,7 +49,7 @@ Options: -q, --quiet Suppress the build output and print image ID on success --rm Remove intermediate containers after a successful build (default true) --security-opt value Security Options (default []) - --shm-size string Size of /dev/shm, default value is 64MB. + --shm-size bytes Size of /dev/shm The format is ``. `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. diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 3587e03fd0..cbb9598a78 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -107,7 +107,7 @@ Options: --rm Automatically remove the container when it exits --runtime string Runtime to use for this container --security-opt value Security Options (default []) - --shm-size string Size of /dev/shm, default value is 64MB. + --shm-size bytes Size of /dev/shm The format is ``. `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. diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 3cddb9d374..837ba79b9e 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -117,7 +117,7 @@ Options: --rm Automatically remove the container when it exits --runtime string Runtime to use for this container --security-opt value Security Options (default []) - --shm-size string Size of /dev/shm, default value is 64MB. + --shm-size bytes Size of /dev/shm The format is ``. `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. diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index 08771272a7..9992996597 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -39,7 +39,7 @@ Options: --hostname string Container hostname -l, --label list Service labels (default []) --limit-cpu decimal Limit CPUs (default 0.000) - --limit-memory bytes Limit Memory (default 0 B) + --limit-memory bytes Limit Memory --log-driver string Logging driver for service --log-opt list Logging driver options (default []) --mode string Service mode (replicated or global) (default "replicated") @@ -51,7 +51,7 @@ Options: --read-only Mount the container's root filesystem as read only --replicas uint Number of tasks --reserve-cpu decimal Reserve CPUs (default 0.000) - --reserve-memory bytes Reserve Memory (default 0 B) + --reserve-memory bytes Reserve Memory --restart-condition string Restart when condition is met (none, on-failure, or any) --restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) --restart-max-attempts uint Maximum number of restarts before giving up diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 654c59b875..0afbc3bb15 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -50,7 +50,7 @@ Options: --label-add list Add or update a service label (default []) --label-rm list Remove a label by its key (default []) --limit-cpu decimal Limit CPUs (default 0.000) - --limit-memory bytes Limit Memory (default 0 B) + --limit-memory bytes Limit Memory --log-driver string Logging driver for service --log-opt list Logging driver options (default []) --mount-add mount Add or update a mount on a service @@ -61,7 +61,7 @@ Options: --read-only Mount the container's root filesystem as read only --replicas uint Number of tasks --reserve-cpu decimal Reserve CPUs (default 0.000) - --reserve-memory bytes Reserve Memory (default 0 B) + --reserve-memory bytes Reserve Memory --restart-condition string Restart when condition is met (none, on-failure, or any) --restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) --restart-max-attempts uint Maximum number of restarts before giving up