Skip to content

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

Merged
tiborvass merged 1 commit into
docker:masterfrom
thaJeztah:hide_experimental_deploy
Feb 8, 2019
Merged

Hide legacy top-level "deploy" command with DOCKER_HIDE_LEGACY_COMMANDS=1#1602
tiborvass merged 1 commit into
docker:masterfrom
thaJeztah:hide_experimental_deploy

Conversation

@thaJeztah

Copy link
Copy Markdown
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
Copy Markdown

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

@silvin-lubeckisilvin-lubecki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

ping @vdemeester PTAL 🙏

@tiborvass
tiborvass merged commit 60e7743 into docker:masterFeb 8, 2019
@GordonTheTurtleGordonTheTurtle 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 freeto 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

@thaJeztah@codecov-io@tiborvass@silvin-lubecki@GordonTheTurtle