Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/command/registry/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion docs/reference/commandline/logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

<!---MARKER_GEN_START-->
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.


<!---MARKER_GEN_END-->

## 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
```

Expand Down