Hosting our own registry

  • We need to run a registry container

  • It will store images and layers to the local filesystem
    (but you can add a config file to use S3, Swift, etc.)

  • Docker requires TLS when communicating with the registry

    • unless for registries on (i.e. localhost)

    • or with the Engine flag --insecure-registry

  • Our strategy: publish the registry container on port 5000,
    so that it's available through on each node

Deploying the registry

  • We will create a single-instance service, publishing its port on the whole cluster
  • Create the registry service:

    docker service create --name registry --publish 5000:5000 registry
  • Now try the following command; it should return {"repositories":[]}: