When I'm running docker registry in swarm:
docker service create \
--name docker-registry \
--mount type=bind,src=/some/path,dst=/var/lib/registry \
-e REGISTRY_HTTP_ADDR=0.0.0.0:5000 \
--publish 5000:5000 \
--replicas 2 \
registry:2
and trying to push or pull to that registry (from another server) it hangs:
$ docker tag hello-world:latest 111.222.333.333:5000/hello-world
$ docker push 111.222.333.333:5000/hello-world
The push refers to a repository [111.222.333.333:5000/hello-world]
428c97da766c: Retrying in 1 second
but it works when I run it as container:
docker run -d \
-p 5000:5000 \
--restart=always \
--name docker-registry \
-v /some/path:/var/lib/registry \
registry:2
I added IP registry to insecure registries. What am I doing wrong?