The DockerHub doc mentions:
The build process looks for a README.md
in the same directory as your Dockerfile
.
(see for instance 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.
Note, as mentioned here by Andy, this does not work for manual build.
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.
The OP asks:
Is there an API call where I can set the description of the repo?
Not that I know of (Docker Hub API was deprecated in docker 1.8+)
Issue 467 reports the same uncertainty:
Sometimes the automated build system will still use the top-level README
file.
And issue 402 reports:
"Every once in a while, the content in the Full Description and the Dockerfile
page will be from an old release tag."
And then:
"Has the specification for pulling README
s 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 confirms:
I notice two obvious failings here:
- a) The
README.md
is not respected in the sub-directory where the Dockerfile is
- b) Even if the
README.md
is at the repoository's top-level (as well as the Dockerfile) "sometimes" it is not read in and the description is left blank; even after force pushes to the underlying repository.