0

I am trying to push an image built with ansible-container to my registry in Dockerhub.I have pushed to this same image to the same registry using just docker so I am pretty sure it has nothing to do with my local version of docker or with Dockerhub.

The command I run to push the image is:

ansible-container push --username zacharius --password $PASS --push-to https://hub.docker.com/

and I get a timeout message:

container.exceptions.AnsibleContainerConductorException: Error logging into registry: 500 Server Error: Internal Server Error ("Get https://hub.docker.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")

I have been pulling my hair out trying to get ansible-container and Dockerhub to talk to each other and any assistance would be greatly appreciated

Zacharius
  • 23
  • 7

1 Answers1

1

Ok so I figured out my problem was in assuming that the url to my docker registry was the same as the url I used to view the registry from my browser. The actual registry I wanted was docker.io. Also I need to include my username at the end of the url. So the correct command is:

ansible-container push --username zacharius --password $PASS --push-to https://docker.io/zacharius

Posting this answer for people in the future with similar issue. I only saw docker.io in someone else's code example and am otherwise not sure how I was supposed to know this was the correct url

Zacharius
  • 23
  • 7