Private Docker Registry with Swarm

  • Works the same way as localhost
  • Because of Routing Mesh, all nodes can see
  • Remember to decide how to store images (volume driver)
  • NOTE: All nodes must be able to access the images
  • ProTip: Use a hosted SaaS registry if possible

How to do it

~> docker service create --name registry -p 5000:5000 registry

~> docker service ps registry
ID                  NAME                IMAGE               NODE      DESIRED STATE       CURRENT STATE            ERROR               PORTS
3bk9yp618nnb        registry.1          registry:latest     manager1      Running             Running 10 seconds ago
  • Re-tag an existing image and push it to your new registry
docker tag hello-world
docker tag nginx

docker push
docker push
  • Remove that image from local cache and pull it from new registry
docker image rm hello-world
docker image rm nginx

docker image rm
docker image rm

docker pull
docker pull
  • We can visit catalog on hostname:5000/v2/_catalog
    "repositories": [

results matching ""

    No results matching ""