Assuming that you have created docker image at your system, Here are the steps to push your image to docker hub:
- Create an account on docker hub (https://hub.docker.com)
- Login to your docker hub account
Create a file named docker-password.txt containing your docker hub account password.
cat ./docker-password.txt | sudo docker login --username=<DOCKER_HUB_USERNAME> --password-stdin
- Push Image to docker hub
sudo docker push DOCKER_HUB_USERNAME/IMAGE_NAME:TAG_NAME