November 07, 2019

Docker registry


The Docker toolset to pack, ship, store, and deliver content.

This repository’s main product is the Docker Registry 2.0 implementation for storing and distributing Docker images. It supersedes the docker/docker-registry project with a new API design, focused around security and performance.

To be simple


Simply, just run below command:


Get any image from the hub and tag it to point to your registry:

Running a domain registry

While running on localhost has its uses, most people want their registry to be more widely available. To do so, the Docker engine requires you to secure it using TLS, which is conceptually very similar to configuring your web server with SSL.


Let’s create some directories

First of all, create htpasswd file so that client can login to this hub

And now, copy or create your own seft sign certificates and save these file {ca.pem,cert.pem,key.pem} into certs/

Then, we need to create docker-compose.yml:

And run, $ docker-compose up -d


Create ca.crt for each client with content of ca.crt file that you’ve created above:

You can try to login now

That’s all, now you can login to your hub and pull, push whatever you want


You may get some troubles like:


Insecure registry

  • Linux

  • Redhat

  • On some distributions, e.g. Oracle Linux 6, the Shared System Certificates feature needs to be manually enabled:

  • or you can open /etc/default/docker and add the following at the end:


If you use boot2docker (Mac), you may do some steps below:

and you need to add --insecure-registry=<your-domain> (dont need to include port if your hub server use port 443) inside EXTRA_ARGS like:

Exit and docker-machine restart <your-machine>.

Now you can login to your hub and pull-push your image.

Work with us

Drop us a message if you need any helps from the Dwarves

Let's build something