Docker Community Forums

Share and learn in the Docker community.

How to push local images to a network docker reposity in network?

I am creating a docker swarm for our company, and found problems, with local docker registry…
On one node, i pulled the registry container, and it’s accessible from network through the port 5000.
But, when i try to do:
docker login
i get error:

Error response from daemon: login attempt to failed with status: 403 Forbidden

But when i do locally:
docker login localhost:5000
it is successful. And i’m even able to push images to localhost:5000

I found on internet, that it is something that needs to be done with the /etc/default/docker, and /etc/docker/daemon.json where i added this:

        "insecure-registries":["", ""]

Could you please, tell me what i have to do to make it work?
Thanks in advance,

localhost is equally insecure as and if it were the problem, you would get different error message. The “403 Forbidden” HTTP code is from a server. When a registry is insecure it is decided by the docker daemon which is a client from the registry’s point of view.

As far as I know (and i could be wrong) you can’t even define an entire network as insecure registry like It must be host:port

What is Is the IP address of the node or of a Swarm service?