Docker push to private registry issues

Here is what I have setup:

Docker daemon running as insecure registry as below:

  • Docker, php and python
  • Links apps in Docker Swarm Mode
  • Kafka with Docker Problems
  • Copy or scp files to /var/lib/boot2docker for boot2docker VM managed by docker-machine
  • Docker cannot log into existing container on amazon EC2, takes forever to respond
  • Running nano in docker container
  • 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 ??

  • Why are <none> images created and why doesn't Docker clean them up?
  • How to obtain Docker image ID from API after building?
  • Docker for Jobs
  • Possible to run two instances of docker containers on one mysql database container?
  • Source code for Docker Swarm load balancer
  • Load balance docker swarm
  • 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.