From d6a491a5fb357fce78e6ce63d79d937f6b429294 Mon Sep 17 00:00:00 2001 From: Dean Chen <862469039@qq.com> Date: Tue, 18 Aug 2026 18:43:27 +0500 Subject: [PATCH] docs(logout): say no SERVER means Docker Hub The cobra long help said the default came from the daemon. The client always uses Docker Hub's index when SERVER is omitted. Signed-off-by: Dean Chen <862469039@qq.com> --- cli/command/registry/logout.go | 2 +- docs/reference/commandline/logout.md | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cli/command/registry/logout.go b/cli/command/registry/logout.go index 16218f67d9a7..7727bf45ef8f 100644 --- a/cli/command/registry/logout.go +++ b/cli/command/registry/logout.go @@ -22,7 +22,7 @@ func newLogoutCommand(dockerCLI command.Cli) *cobra.Command { cmd := &cobra.Command{ Use: "logout [SERVER]", Short: "Log out from a registry", - Long: "Log out from a registry.\nIf no server is specified, the default is defined by the daemon.", + Long: "Log out from a registry.\nIf no server is specified, log out of Docker Hub.", Args: cli.RequiresMaxArgs(1), RunE: func(cmd *cobra.Command, args []string) error { var serverAddress string diff --git a/docs/reference/commandline/logout.md b/docs/reference/commandline/logout.md index f9d645559547..9f40dd996a1b 100644 --- a/docs/reference/commandline/logout.md +++ b/docs/reference/commandline/logout.md @@ -2,14 +2,21 @@ Log out from a registry. -If no server is specified, the default is defined by the daemon. +If no server is specified, log out of Docker Hub. +## Description + +With no argument, `docker logout` removes credentials for Docker Hub +(`https://index.docker.io/v1/`). It does not consult the daemon for a +default registry. Pass a server to log out of a private registry. + ## Examples ```console +$ docker logout $ docker logout localhost:8080 ```