January 2018
Intermediate to advanced
414 pages
10h 29m
English
When we create a swarm's service, we specify an image that will be used, but when we ask Docker to create the instances of the service, it will use the swarm master node to do it.
If we have built our Docker images in our machine, they are not available on the master node of the swarm, so it will create a registry service that we can use to publish our images and reference when we create our own services.
First, let's create the registry service:
docker service create --name registry --publish 5000:5000 registry
Now, if we list our services, we should see our registry created:
docker service lsID NAME MODE REPLICAS IMAGE PORTSos5j0iw1p4q1 registry replicated 1/1 registry:latest *:5000->5000/tcp
And if we visit http://localhost:5000/v2/_catalog ...
Read now
Unlock full access