How to Logout from Docker Registry? [SOLVED]


Logout from Docker Registry

Docker is one of the best containerization tools used by a lot of industries which helps build, test and deploy applications in an effective manner without any target environment dependency. The docker images can be hosted either on a private docker registry which is maintained by individual organizations or certain images could be hosted on a public docker registry which is accessible by anyone. The docker images can be pulled from the target docker registry on a need basis.

In this article let us understand how to log out of the docker registry.


Understand the docker logout command

Docker logout is only possible via the command line. The docker logout command logs out of the docker registry.

To know more about what the command is used for, type the command mentioned below

$ docker logout --help


Usage:  docker logout [SERVER]
Log out from a Docker registry.
If no server is specified, the default is defined by the daemon.


What does the docker logout command do?

The command is used to log out of a docker registry located on a specified server. The server value could be either a URL or the hostname. If you do not specify the server value, the command will try to log out of the public registry which is located here - by default.


$ docker logout


Removing login credentials for


Logout from the registry on your localhost

In order to logout from the registry on the localhost, you can use the below command.

$ docker logout localhost:8080


Removing login credentials for localhost:8080


How to remove the docker credentials

By default, whenever you login to docker registries, the command stores the credentials inside the $HOME/.docker/config.json path in base64 encoded format.

In order to remove the docker credentials you have to remove the entry in $HOME/.docker/config.json



I hope this article helped you understand more about the docker logout command. In case of any queries please feel free to reach out to us and we will respond back at the earliest.

Thanks for reading. Happy learning!!




Views: 183
Deepak Prasad

Deepak Prasad

He is the founder of GoLinuxCloud and brings over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels in various domains, from development to DevOps, Networking, and Security, ensuring robust and efficient solutions for diverse projects. You can connect with him on his LinkedIn profile.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to

Thank You for your support!!

Leave a Comment