Docker push to private registry issues

Here is what I have setup:

Docker daemon running as insecure registry as below:

  • apache proxy dosn't work
  • GCR Builds fail
  • How to get all containers using Dockerode and Javascript
  • docker-compose tries to access registry v1 on first “up”
  • Kubernetes locally via Docker: why do we need port forwarding?
  • How to add users to docker container running on a vm
  • docker -d --iptables=true --insecure-registry

    Now, when I try to push to that registry from a remote system it is giving me different errors.

    Error 1:

    docker push
    EOF error: 
    FATA[0002] Error: Invalid registry endpoint Get EOF 

    Error 2: After getting error 2, I added the ip to the /etc/hosts on the docker host. If I try “docker push docker:5000/test” it tries to use https and fails with Error 1 and if I try “docker push docker/test”, it is asking me for a username and password. Is this expected ??

    The push refers to a repository [docker/test] (len: 1)
    Sending image list
    Please login prior to push:
    Username: docker
    FATA[0011] Error response from daemon: Registration: "Forbidden username"

    If it needs authentication, where can I find my username and password. Also can I start the docker registry without authentication ??

  • GitLab CI: How to pull specific docker container for deployment
  • docker push to dockerhub private repo sometimes pushes existing layer again (ubuntu base layer)
  • Create a development environment for Laravel in Docker
  • How to access database which runs on host from inside of container?
  • Docker: Cannot locate specified Dockerfile error
  • jenkins exectue shell docker in slave node without sudo
  • 2 Solutions collect form web for “Docker push to private registry issues”

    Once you have your private registry running you need to retag the image you want to upload. Assuming the command docker images returns a image called jason/test you use the docker tag command to copy it with a new name:

    docker tag jason/test <>:<port>/<image name>

    Assuming that your internal docker registry is accessible via the dns name myregistry.mycompany.local and it running on the default port of 5000 the command would look like:

    docker tag jason/test myregistry.mycompany.local:5000/test

    The docker images command will now show:

    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
    myregistry.mycompany.local:5000/test   latest              c776f089e3cf        6 days ago          707.3 MB
    jason/test               latest              c776f089e3cf        6 days ago          707.3 MB

    Now you can run docker push myregistry.mycompany.local:5000/test to push the image to your internal registry.

    Running the Docker daemon with the argument --insecure-registry does not start an insecure registry, it just allows it to connect to one.

    The command docker push was trying to connect to a registry at, but it doesn’t exist, so it errors out.

    The command docker push docker/test tries to push to the official Docker Hub, which requires you to have set up an account, hence asking you for a username and password.

    Have a look at the Github repository for the registry for details on how to run your own registry.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.