DockerCLI/cli
Sebastiaan van Stijn 1df6b68111
Mark checkpoint feature as Linux-only, and homogenize error messages
This patch adds annotations to mark the checkpoint commands as Linux only, which
hides them if the daemon is running a non-matching operating-system type;

Before:

    docker

    Usage:	docker COMMAND

    A self-sufficient runtime for containers

    ...

    Management Commands:
      config      Manage Docker configs
      container   Manage containers
      image       Manage images

After:

    docker

    Usage:	docker COMMAND

    A self-sufficient runtime for containers

    ...

    Management Commands:
      checkpoint  Manage checkpoints
      config      Manage Docker configs
      container   Manage containers
      image       Manage images

This change also prints errors when attempting to use checkpoint commands or
flags if the feature is not supported by the Daemon's operating system;

    $ docker checkpoint --help
    docker checkpoint is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker checkpoint create --help
    docker checkpoint create is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker checkpoint ls --help
    docker checkpoint ls is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker checkpoint rm --help
    docker checkpoint rm is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker container start --checkpoint=foo mycontainer
    "--checkpoint" requires the Docker daemon to run on linux, but the Docker daemon is running on windows

    $ docker container start --checkpoint-dir=/foo/bar mycontainer
    "--checkpoint-dir" requires the Docker daemon to run on linux, but the Docker daemon is running on windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-31 22:25:06 +02:00
..
command Mark checkpoint feature as Linux-only, and homogenize error messages 2018-05-31 22:25:06 +02:00
compose Support for rollback config in compose 3.7 2018-05-29 11:37:51 +02:00
config Check allNamespace config value while loading configuration file 2018-05-28 15:15:25 +02:00
debug updated vendoring 2017-09-01 19:41:06 -04:00
flags --orchestrator flag is now a persistent flag 2018-05-28 10:43:32 +02:00
manifest Convert assert.Check(t, is.Error()) to assert.Error 2018-03-06 16:00:28 -05:00
registry/client Bump moby to d37f5c6bdf788a6cb82c07fb707e31a240eff5f9 2018-05-18 11:44:14 +02:00
trust Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
winresources Add windows resources to binary. 2017-05-15 18:03:03 -04:00
cobra.go Hide [flags] in usage output 2018-05-19 02:51:55 +02:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go Singularize / pluralize "argument(s)" in error message 2017-08-12 18:25:38 +02:00
required_test.go Post migration fixes 2018-03-05 19:41:17 -05:00
version.go Fix grammar typo in comment 2018-02-28 11:29:40 -05:00