Let’s use Dockerhub as our example.
Once you’ve set up a Dockerhub account., you can now login through the terminal.
$ docker login
Assuming the image is tagged, the final step is to push the image to a registry.
$ docker push NAME[:TAG]
For example, to push the sample Python hello-world application tagged with v1 to ‘my-repo’ repository in DockerHub
$ docker push my-repo/python-helloworld:v1.0.0
To pull an image from DockerHub,
$ docker pull NAME[:TAG]