First of we install the docker client, server and registry on our debian machine.
apt install docker docker.io docker-registry
The registry could be installed as a service in our docker cloud as well.
docker run -d -p 5000:5000 --restart=always --name registry registry:2