1. Before push image to Docker Hub, register an account in https://hub.docker.com/
2.Input "docker login" in the docker command line interface and input the username and password of account from Docker Hub
3.Create and build the docker images, here we use the hello-world from docker as an example
Use below method to create tag and push to docker hub
After the image is pushed to the docker hub, you could see the the hello-world image exists in the Docker Hub with the tag as latest(default, you could set it as 0.0.1 and other tag value)
Key point:
The reponame should be in this format: