To distribute the updated docker images among a cluster, compared with using a centralized registry, use P2P registry is more bandwidth and speed-efficient.

We can deploy docker image registry on any server.


To init the server,

docker run -d -e REGISTRY_HTTP_ADDR= -p 5000:5000 --name registry registry:2
docker tag my-registry:5000/image-name:version
docker push my-registry:5000/image-name:version

To let client connect to server,

vi /etc/docker/daemon.json
# add a line
# {
#     ...
#     "insecure-registries": ["my-registry:5000"]
#     ...
# }
systemctl restart docker
# or
# sudo killall -1 dockerd
docker pull my-registry:5000/image-name:version
docker tag my-registry:5000/image-name:version


“Server Gave Http Response To Https Client”

If the client return error,

Error response from daemon: Get https://my-registry:5000/v2/: http: server gave HTTP response to HTTPS client

That's because the client's dockerd doesn't has insecure registries set.

“Manifest Unknown”

If the client return error,

Error response from daemon: manifest for my-registry:5000/services:octopus-manager- not found: manifest unknown: manifest unknown

That's because the server doesn't has the the target image, aka my-registry:5000/image-name:version in its own registry. Please make sure if the server has image pushed, to itself.