Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker public registry push fails: Repository does not exist

I'm trying to push my docker image up into the public docker registry:

$ docker login Username (binarybana):  WARNING: login credentials saved in /home/jknight/.dockercfg. Login Succeeded  $ docker images REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE binarybana/dev-fedora   latest              10c7881fbaca        24 hours ago        1.148 GB binarybana/fedoradev    latest              10c7881fbaca        24 hours ago        1.148 GB binarybana/fedora-dev   latest              10c7881fbaca        24 hours ago        1.148 GB <none>                  <none>              b44397dc4c99        24 hours ago        1.148 GB <none>                  <none>              a98c27ba4738        24 hours ago        1.141 GB <none>                  <none>              775c74a34add        24 hours ago        1.141 GB <none>                  <none>              2be2491d2354        24 hours ago        1.141 GB docker.io/fedora        21                  93be8052dfb8        7 days ago          241.3 MB  $ docker push binarybana/dev-fedora  Do you really want to push to public registry? [Y/n]: Y The push refers to a repository [docker.io/binarybana/dev-fedora] (len: 0) FATA[0001] Repository does not exist: docker.io/binarybana/dev-fedora   $ docker push binarybana/fedora-dev  Do you really want to push to public registry? [Y/n]: Y The push refers to a repository [docker.io/binarybana/fedora-dev] (len: 0) FATA[0002] Repository does not exist: docker.io/binarybana/fedora-dev  

Yet, I've already created the repository (viewable here). And I've also tried to push to repository names that I haven't already created (the first try in the example above).

I think the (len: 0) has something to do with it, but I can't google it. Also I originally created the image from a dockerfile as:

docker build -t binarybana/fedora-dev . 

Thanks.

like image 590
JKnight Avatar asked Apr 29 '15 23:04

JKnight


People also ask

How do I push an image to Docker Hub public repository?

To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :<tag> to them (for example docs/base:testing ).

Does docker build push to registry?

The built image is then pushed to the Docker Hub registry. You can still use docker push to push pre-built images to repositories with Automated Builds configured. If you have automated tests configured, these run after building but before pushing to the registry.


1 Answers

Always build your image with "username" and "tag"

docker build -t <username>/dev-fedora:latest .

After building push the image

docker push <username>/dev-fedora:latest

like image 122
Mahattam Avatar answered Oct 11 '22 12:10

Mahattam