简体   繁体   English

无法推送到 Docker 集线器 - 标签不存在

[英]Unable to push to Docker Hub - tag does not exist

Have been bumping my head against the wall on this one for a while.一段时间以来,我一直把头撞在墙上。

构建规则

And while the "latest" tag builds just fine, the "dev" tag (or any other tag I have attempted does not.虽然“最新”标签构建得很好,但“开发”标签(或我尝试过的任何其他标签都没有。

Removing intermediate container df365d3a022f ---> dd24ff34c9e9 Successfully built dd34ff34c9e9 Successfully tagged myrepo/app:latest Pushing index.docker.io/myrepo/app:dev... Push failed. Attempt 2 in 60 seconds. Push failed. Attempt 3 in 60 seconds. Push failed. Attempt 4 in 60 seconds. Push failed. Attempt 5 in 60 seconds. {u'message': u'tag does not exist: myrepo/app:dev'}

When I build locally I can push that same tag to the Docker Hub:当我在本地构建时,我可以将相同的标签推送到 Docker 集线器:

docker push docker.io/nomadcalendar/app:dev The push refers to repository [docker.io/myrepo/app] a69634ab3c0f: Preparing 0daa743ba1bd: Preparing... 030309cad3ba: Layer already exists dev: digest: sha256:9a828hgh5ccabd3364666cb20774f53dc1b5e1563329f8fd801edcae4b50f30 size: 16805

And even when the tag built locally and pushed to the Docker Hub appears in Docker hub, I am still unable to use that tag in the Docker Hub Automated Builds即使在本地构建并推送到 Docker 集线器的标签出现在 Docker 集线器中时,我仍然无法在 Docker 集线器中使用该标签自动构建

Any suggestions?有什么建议么?

In my case, the issue was related to the build hooks that were enabled through a "hooks" folder in the root directory of the project.就我而言,该问题与通过项目根目录中的“钩子”文件夹启用的构建钩子有关。 Removing hooks fixed the issue.移除钩子解决了这个问题。

Looks like an issue when you try to build two different tags from the same trigger.当您尝试从同一个触发器构建两个不同的标签时,这似乎是一个问题。 In this case both dev and latest are configured to build off of master, and the build command creates one tag but tries to push the other.在这种情况下,dev 和 latest 都配置为从 master 构建,并且 build 命令创建一个标签但尝试推送另一个标签。 For now, you'll want to push only a single tag for the master branch, rather than two rules for different tags.现在,您只想为 master 分支推送一个标签,而不是为不同的标签推送两个规则。

In github, I'd recommend following and adding feedback on hub-feedback issue 1828 which looks similar to your issue.在 github 中,我建议关注并添加关于集线器反馈问题 1828 的反馈,这看起来与您的问题相似。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM