- [Instructor] The first thing to remember
is anytime you go to use a registry,
you need to first log in to that registry.
To show you how to log in,
let's run the command docker login
and it tells us here to login with our Docker ID
to push and pull images to and from Docker Hub.
If you don't have a Docker ID,
visit hub.docker.com to create one.
I can tell you that it's free, it's easy.
It only takes a minute.
You just have to supply your email address
and verify that email address
and you can start using Docker Hub to store your images.
Remember it's Docker's free cloud registry.
So I'm going to enter my Docker Hub username
which I've already setup
as well as my password and there we go, login succeeded.
So that's how easy it is to login to a registry
and it's also very easy to do a logout
and logout to a registry.
So the default registry again is hub.docker.com,
but what if we want to log in to another registry?
Well, we could log in to Docker's open source registry
which we already deployed on this host
so we'll log in to localhost:5000.
The other option we talked about
for a private local registry is Docker Trusted Registry.
To log in to Docker Trusted Registry,
you need to know your username and password.
So I've already created a username called David.
I actually do know my password
which can be configured right here
if you're an administrator
or if you wanna reset your own password.
If we go back to the command line,
again we'll use the docker login command
and we'll log in using the IP address in this case.
Of course, you might be using a host name.
I'll provide the username that I created already
over in Docker Trusted Registry
as well as my password and there we go, login succeeded.
From here, I could do a docker push
and push up an image to Docker Trusted Registry.
So that's how easy it is to login to a registry.