gpt4 book ai didi

Dockerhub 存储库说明

转载 作者:IT老高 更新时间:2023-10-28 21:22:37 24 4
gpt4 key购买 nike

有人知道 dockerhub 如何管理自动构建存储库的描述吗?

Dockerhub有一个很好的功能,即源存储库中的 README.md 被用作存储库描述。实际上,存储库的描述并不总是来自 master 分支的最新 README.md。它似乎非常随机或与最新版本有关。

示例存储库:

  • /
  • Dockerfile
  • README.md

分支机构:

  • 大师

标签:

  • V1.0
  • V1.1
  • V2.0
  • V2.1

现在的问题是:如果我将所有标签都放在 Autobuild 上,则无法重现哪个 README.md 将显示在存储库描述中。

它有什么技巧,或者有一个 API 可以让我设置描述吗?

我希望总是显示我的 master/README.md 的最新提交!

最佳答案

DockerHub doc提及:

The build process looks for a README.md in the same directory as your Dockerfile.

(例如参见 tombatossals/dockerhub/nodejs)

If you have a README.md file in your repository, it is used in the repository as the full description.

If you change the full description after a build, is overwritten the next time the Automated Build runs.
To make changes, modify the README.md in your Git repository.

注意,如 mentioned hereAndy ,这不适用于手动构建。

For manual builds (where you push your own image), Docker Hub does not peek inside your image and has no way to know about your Readme.
You'll need to manually add your Readme text to the Information section.


OP 询问:

Is there an API call where I can set the description of the repo?

我不知道(Docker Hub API was deprecated in docker 1.8+)


Issue 467报告相同的不确定性:

Sometimes the automated build system will still use the top-level README file.

还有 issue 402报告:

"Every once in a while, the content in the Full Description and the Dockerfile page will be from an old release tag."

然后:

"Has the specification for pulling READMEs changed? It now takes the top-level README from the source repository instead of from the directory where the Dockerfile is specified; considering a common use-case is a repository of Dockerfiles this has completely messed up the documentation."

Issue 300确认:

I notice two obvious failings here:

  • a) README.md 在 Dockerfile 所在的子目录中不受尊重
  • b) 即使 README.md 位于存储库的顶层(以及 Dockerfile)“有时”它也不会被读入并且描述是空白的;即使在强制推送到底层存储库之后。

关于Dockerhub 存储库说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35032775/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com