Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I publish to docker hub?

What do I need to do to make my images available to the public via the Docker Hub?

Some errors for search

The push refers to a repository docker.io/yourname/yourimage

or

Repository does not exist: docker.io/yourname/yourimage
like image 924
J0hnG4lt Avatar asked Mar 14 '23 08:03

J0hnG4lt


1 Answers

Register a docker hub account.

Run:

docker login

This will add a file that looks like so to ~/.docker/config.json:

{
    "auths": {
        "https://index.docker.io/v1/": {
            "auth": "somekey",
            "email": "[email protected]"
        }
    }
}

You should be able to do a

docker push yourname/yourimage
like image 180
J0hnG4lt Avatar answered Mar 24 '23 09:03

J0hnG4lt