Skip to content

Conversation

@thaJeztah
Copy link
Member

The DOCKER_HIDE_LEGACY_COMMANDS environment variable allows hiding legacy top-level commands that are now available under docker <object> <verb>. The docker deploy top-level command is experimental, and replaced by docker stack deploy.

This patch hides the top-level docker deploy if the DOCKER_HIDE_LEGACY_COMMANDS environment variable is set.

Before this change:

DOCKER_HIDE_LEGACY_COMMANDS=1 docker --help

...

Commands:
  build       Build an image from a Dockerfile
  deploy      Deploy a new stack or update an existing stack
  login       Log in to a Docker registry
  logout      Log out from a Docker registry
  run         Run a command in a new container
  search      Search the Docker Hub for images
  version     Show the Docker version information
...

With this patch applied:

DOCKER_HIDE_LEGACY_COMMANDS=1 docker --help

...

Commands:
  build       Build an image from a Dockerfile
  login       Log in to a Docker registry
  logout      Log out from a Docker registry
  run         Run a command in a new container
  search      Search the Docker Hub for images
  version     Show the Docker version information
...

- Description for the changelog

+ Hide legacy top-level "deploy" command with DOCKER_HIDE_LEGACY_COMMANDS=1

…DS=1

The `DOCKER_HIDE_LEGACY_COMMANDS` environment variable allows hiding legacy
top-level commands that are now available under `docker <object> <verb>`. The
`docker deploy` top-level command is experimental, and replaced by
`docker stack deploy`.

This patch hides the top-level `docker deploy` if the `DOCKER_HIDE_LEGACY_COMMANDS`
environment variable is set.

Before this change:

    DOCKER_HIDE_LEGACY_COMMANDS=1 docker --help

    ...

    Commands:
      build       Build an image from a Dockerfile
      deploy      Deploy a new stack or update an existing stack
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      run         Run a command in a new container
      search      Search the Docker Hub for images
      version     Show the Docker version information
    ...

With this patch applied:

    DOCKER_HIDE_LEGACY_COMMANDS=1 docker --help

    ...

    Commands:
      build       Build an image from a Dockerfile
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      run         Run a command in a new container
      search      Search the Docker Hub for images
      version     Show the Docker version information
    ...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-io
Copy link

Codecov Report

Merging #1602 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1602   +/-   ##
=======================================
  Coverage   55.33%   55.33%           
=======================================
  Files         283      283           
  Lines       19305    19305           
=======================================
  Hits        10682    10682           
  Misses       7927     7927           
  Partials      696      696

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member Author

ping @vdemeester PTAL 🙏

@tiborvass tiborvass merged commit 60e7743 into docker:master Feb 8, 2019
@GordonTheTurtle GordonTheTurtle added this to the 19.03.0 milestone Feb 8, 2019
@thaJeztah thaJeztah deleted the hide_experimental_deploy branch February 8, 2019 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants