I have a problem pushing my docker container for my webapp to docker hub

I have set up my codebase and created a repo on dockerhub.
In trying the debug the issue i stated ,
I ping registry-1.docker.io their was timeout
i ping google.com it connected.

if it is an authentication issue how do i fix it in my docker.
Also, the repository exist as I ran command: docker images.

i need an assitance here? thank you so much.

Not everything on the net can be pinged; that’s not necessarily a problem. The docker CLI knows how to contact DockerHub automatically, so you need to:

  • Use docker login to present your credentials to the CLI
  • Tag your image as DOCKER_USERNAME/YOUR_IMAGE_NAME:IMAGE_TAG.
  • Push the image with docker push DOCKER_USERNAME/YOUR_IMAGE_NAME:IMAGE_TAG, which should push your image from your local docker server to DockerHub.

i log in using : docker login -u username , and pushed with docker push DOCKER_USERNAME/YOUR_IMAGE_NAME:IMAGE_TAG. thank you sir