- [Narrator] When it comes to deploying a Docker registry,
if we start with the open source Docker registry option,
and look at the Docker documentation for it,
we're here in the registry overview,
and there's a lot of good information here,
on the open source Docker registry.
If we scroll down to deploy a registry server,
you can see that you can very simply
run the open source registry by using this command
right here: Docker run -d, run it as a demon,
publish port 5000, always restart, name it registry,
and you're going to deploy the registry image, version two.
So let's give that a try.
So we're here on a Docker host,
we're running Docker already.
I'm just going to paste in the command that you saw
in the Docker registry documentation,
and I've actually already done this once on this host,
so it didn't take any time at all to download,
and now if we do a Docker ps,
you can see we are indeed running the registry container.
So as a test, if we wanted to push a container up
to that registry, we could tag a container,
for example, Docker tag ubuntu, and we'll tag it
local host, which is the host name of this registry so far,
and port 5000, and we'll tag it ubuntu, colon, version two,
just for fun.
Now if we clear the screen, do a Docker images,
you can see that tagged image is right there,
so now let's push that image, we'll do a Docker push,
local host, colon, 5000, slash ubuntu, colon, version two.
We'll push it up to our local registry container,
this is using the Docker open source registry.
Now if we were to do a Docker rmi, or a Docker image remove,
on localhost, colon, 5000, slash, ubuntu, colon,
version two, we untagged it, and then we could do
a Docker pull of the same image.
And pull it back down from the local registry.
We'll do a Docker images, and there we go,
there's the image that we pulled down.
So deploying the Docker registry is that easy to do.
Now I did say besides the Docker open source registry,
you also have Docker Trusted Registry,
as a commercial, paid, enterprise-grade option.
If you're running Docker containers in a production
environment, Docker Trusted Registry is the solution
that you're going to wanna use if you need
a local private registry.
In my installation and configuration video,
I showed you how to download and deploy
Docker Trusted Registry.
As a reminder for what Docker Trusted Registry looks like,
here it is.
We're running Docker Trusted Registry locally,
to provide us a private registry,
and it also provides many more advanced features
over the open source registry, as you can imagine.
Of course we have a graphical user interface,
we can create multiple organizations,
it has secure image scanning, and much more.
I'll show you how to push and pull images
to and from Docker Trusted Registry in an upcoming video.
When it comes to deploying registries,
also keep in mind that the default registry is Docker Hub,
and Docker Hub is a public and private registry
that you can leverage for any Docker installation,
whether you're running the community edition of Docker
on your local Windows or Mac system,
or whether you're running the enterprise edition
of Docker on a massive production cluster.
If we sign in to Docker Hub,
as you can see, it looks something like this.
We've got a number of repositories that we've created
throughout this video training course,
and my registry is named daviddavistx.
Inside the repositories, we have a number of
different tags that we've created as we've
pushed and pulled images up to this public Docker registry.