The Docker CLI
Go to file
Sebastiaan van Stijn 0c71f36027 print error if unsupported flags are used
Docker 1.13 and up allows a client to communicate
with older daemons. As a result, flags may be
present that are not supported by the older daemon.

The client already _hides_ flags that are not
supported yet, but this doesn't present users
from using those flags.

This change shows an error if a flag is used
that is not supported by the daemon (either
based on the API version, or because experimental
features are not enabled).

Note that for some options, a check is already
in place in the API client. For those
options, this is just a minor enhancement
to more clearly indicate which _flag_ is
not supported.

Before this change;

    DOCKER_API_VERSION=1.24 docker run -d --stop-timeout=30 busybox top
    mjfyt3qpvnq0iwmun3sjwth9i

    echo -e "FROM busybox\nRUN echo foo > bar" |  DOCKER_API_VERSION=1.24 docker build --squash -
    "squash" requires API version 1.25, but the Docker server is version 1.24

After this change;

    DOCKER_API_VERSION=1.24 docker run -d --stop-timeout=30 busybox top
    "--stop-timeout" requires API version 1.25, but the Docker daemon is version 1.24

    echo -e "FROM busybox\nRUN echo foo > bar" | DOCKER_API_VERSION=1.24 docker build --squash -
    "--squash" requires API version 1.25, but the Docker daemon is version 1.24

    echo -e "FROM busybox\nRUN echo foo > bar" | docker build --squash -
    "--squash" is only supported on a Docker daemon with experimental features enabled

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-03 16:59:20 -08:00
daemon_none.go Fix tests and windows service. 2016-08-25 13:09:36 -04:00
daemon_none_test.go Fix daemon command proxy. 2016-08-26 12:19:02 -04:00
daemon_unit_test.go Fix daemon command proxy. 2016-08-26 12:19:02 -04:00
daemon_unix.go Deprecate "daemon" subcommand 2016-09-23 00:26:27 +02:00
docker.go print error if unsupported flags are used 2017-02-03 16:59:20 -08:00
docker_test.go Move debug functions to cli/debug package 2016-12-12 09:33:58 +01:00
docker_windows.go Windows: work around Go 1.6.2/Nano Server TP5 issue 2016-05-25 11:59:28 +02:00