diff --git a/cli/command/service/opts.go b/cli/command/service/opts.go index c7518e5976..cbe544aacc 100644 --- a/cli/command/service/opts.go +++ b/cli/command/service/opts.go @@ -84,7 +84,7 @@ func (d *DurationOpt) String() string { if d.value != nil { return d.value.String() } - return "none" + return "" } // Value returns the time.Duration @@ -114,7 +114,7 @@ func (i *Uint64Opt) String() string { if i.value != nil { return fmt.Sprintf("%v", *i.value) } - return "none" + return "" } // Value returns the uint64 diff --git a/cli/command/service/opts_test.go b/cli/command/service/opts_test.go index aa2d999dcf..78b956ad67 100644 --- a/cli/command/service/opts_test.go +++ b/cli/command/service/opts_test.go @@ -59,7 +59,7 @@ func TestUint64OptString(t *testing.T) { assert.Equal(t, opt.String(), "2345678") opt = Uint64Opt{} - assert.Equal(t, opt.String(), "none") + assert.Equal(t, opt.String(), "") } func TestUint64OptSetAndValue(t *testing.T) { diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index 5cc8f90da9..c1f827984b 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -31,9 +31,9 @@ Options: --env-file list Read in a file of environment variables (default []) --group list Set one or more supplementary user groups for the container (default []) --health-cmd string Command to run to check health - --health-interval duration Time between running the check (ns|us|ms|s|m|h) (default none) + --health-interval duration Time between running the check (ns|us|ms|s|m|h) --health-retries int Consecutive failures needed to report unhealthy - --health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) (default none) + --health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) --help Print usage --host list Set one or more custom host-to-IP mappings (host:ip) (default []) --hostname string Container hostname @@ -47,16 +47,16 @@ Options: --name string Service name --network list Network attachments (default []) --no-healthcheck Disable any container-specified HEALTHCHECK - -p, --publish list Publish a port as a node port (default []) - --replicas uint Number of tasks (default none) + -p, --publish port Publish a port as a node port + --replicas uint Number of tasks --reserve-cpu decimal Reserve CPUs (default 0.000) --reserve-memory bytes Reserve Memory (default 0 B) --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) (default none) - --restart-max-attempts uint Maximum number of restarts before giving up (default none) - --restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h) (default none) - --secret value Specify secrets to expose to the service (default []) - --stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) (default none) + --restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) + --restart-max-attempts uint Maximum number of restarts before giving up + --restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h) + --secret secret Specify secrets to expose to the service + --stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) -t, --tty Allocate a pseudo-TTY --update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s) --update-failure-action string Action on update failure (pause|continue) (default "pause") diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index f6bd0c34c7..301a0eabe8 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -39,9 +39,9 @@ Options: --group-add list Add an additional supplementary user group to the container (default []) --group-rm list Remove a previously added supplementary user group from the container (default []) --health-cmd string Command to run to check health - --health-interval duration Time between running the check (ns|us|ms|s|m|h) (default none) + --health-interval duration Time between running the check (ns|us|ms|s|m|h) --health-retries int Consecutive failures needed to report unhealthy - --health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) (default none) + --health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) --help Print usage --host-add list Add or update a custom host-to-IP mapping (host:ip) (default []) --host-rm list Remove a custom host-to-IP mapping (host:ip) (default []) @@ -56,19 +56,19 @@ Options: --mount-add mount Add or update a mount on a service --mount-rm list Remove a mount by its target path (default []) --no-healthcheck Disable any container-specified HEALTHCHECK - --publish-add list Add or update a published port (default []) - --publish-rm list Remove a published port by its target port (default []) - --replicas uint Number of tasks (default none) + --publish-add port Add or update a published port + --publish-rm port Remove a published port by its target port + --replicas uint Number of tasks --reserve-cpu decimal Reserve CPUs (default 0.000) --reserve-memory bytes Reserve Memory (default 0 B) --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) (default none) - --restart-max-attempts uint Maximum number of restarts before giving up (default none) - --restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h) (default none) + --restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) + --restart-max-attempts uint Maximum number of restarts before giving up + --restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h) --rollback Rollback to previous specification - --secret-add list Add a secret (default []) + --secret-add secret Add or update a secret on a service --secret-rm list Remove a secret (default []) - --stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) (default none) + --stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) -t, --tty Allocate a pseudo-TTY --update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s) --update-failure-action string Action on update failure (pause|continue) (default "pause")