Get http://localhost:5000/v2/: dial tcp 127.0.0.1:5000: getsockopt: connection refused



  • Error:
    $ docker push localhost:5000/env/dev/zookeeper:3.3.6
    The push refers to a repository [localhost:5000/env/dev/zookeeper]
    Get http://localhost:5000/v2/: dial tcp 127.0.0.1:5000: getsockopt: connection refused

    If you see this error, many posts jumps to DOCKER_OPTS. Sometimes the issue could be an option setting, but if you have never setup a local registry on the host before. The issue is likely you do not have a local registry running on port 5000

    To solve this create local registry, note this is just for testing purposes, there is more to setting up a registry for live environments.

    $ docker run -d -p 5000:5000 --restart=always --name registry registry:2
    

Log in to reply
 

© Lightnetics 2024