mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-19 23:36:33 +00:00
Now that we have a good number of longer exercises, it makes sense to rename the shorter demos/labs into 'labs' to avoid confusion between the two.
876 B
876 B
Hosting our own registry
-
We need to run a
registrycontainer -
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
127.0.0.0/8(i.e.localhost) -
or with the Engine flag
--insecure-registry
-
- Our strategy: publish the registry container on port 5000,
so that it's available through127.0.0.1:5000on each node
Deploying the registry
- We will create a single-instance service, publishing its port on the whole cluster
.lab[
-
Create the registry service:
docker service create --name registry --publish 5000:5000 registry -
Now try the following command; it should return
{"repositories":[]}:curl 127.0.0.1:5000/v2/_catalog
]