docker - Ansible-container push/deploy failure; cant push images to dockerhub
问题描述
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
解决方案
好的,所以我发现我的问题在于假设我的 docker 注册表的 url 与我用来从浏览器查看注册表的 url 相同。我想要的实际注册表是 docker.io。我还需要在网址末尾包含我的用户名。所以正确的命令是:
ansible-container push --username zacharius --password $PASS --push-to https://docker.io/zacharius
为将来有类似问题的人发布此答案。我只在别人的代码示例中看到了 docker.io,否则我不确定我应该如何知道这是正确的 url
推荐阅读
- ibm-cloud - Watson 助手根据@sys-date 的用户输入将星期几放入变量中
- guidewire - 如何将 Guidewire 连接到 Oracle 数据库?
- mongodb - MongoDB - 按方面结果分组
- javascript - 在 VueJS 中通过组件和 v-for 渲染对象的键和值
- flutter - 如何在本地使用颤振插件?
- sql - 内联表值函数中的变量
- angular - e2e 测试因 404 而失败,但预期为 404
- django - 我更改了 aws 上正在运行的 django 项目中的代码,但更改没有反映出来
- c# - 将 Excel/Word/PDF 合并导出为 PDF
- python - 使用 ffmpeg 在 python 中连接 mp3