Skip to content

Commit 69864c0

Browse files
authored
Merge pull request #2029 from infosiftr/finally-some-docs
A little ♥♥♥ and clarification for the main README
2 parents 2a5aff1 + 6d56ef8 commit 69864c0

File tree

2 files changed

+44
-28
lines changed

2 files changed

+44
-28
lines changed

README.md

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# What is this?
22

3-
This repository contains the image documentation for each of the official images. See [docker-library/official-images](https://github.com/docker-library/official-images) for more information about the program in general.
3+
This repository contains the image documentation for each of the Docker Official Images. See [docker-library/official-images](https://github.com/docker-library/official-images) for more information about the program in general.
44

55
All Markdown files here are run through [tianon's fork of `markdownfmt`](https://github.com/tianon/markdownfmt), and verified as formatted correctly via GitHub Actions.
66

@@ -62,23 +62,25 @@ After opening your Pull Request the changes will be checked by an automated `mar
6262

6363
Optionally:
6464

65-
- run `./markdownfmt.sh -l myimage` to verify whether format of your markdown files is compliant to `tianon/markdownfmt`. In case you see any file names, markdownfmt detected some issues, which might result in a failed build during continuous integration. run `./markdownfmt.sh -d myimage` to see a diff of changes required to pass.
65+
- run `./markdownfmt.sh -l myimage` to list any files that are non-compliant to [`tianon/markdownfmt`](https://hub.docker.com/r/tianon/markdownfmt).
66+
Any files in the list will result in a failed build during continuous integration.
67+
- run `./markdownfmt.sh -d myimage` to see a diff of changes required to pass.
6668
- run `./update.sh myimage` to generate `myimage/README.md` for manual review of the generated copy.
6769
**Note:** do not actually commit the `README.md` file; it is automatically generated/committed before being uploaded to Docker Hub.
6870

6971
# Files related to an image's docs
7072

7173
## folder `<image name>`
7274

73-
This is where all the partial and generated files for a given image reside, (ex: `golang/`).
75+
This is where all the partial (e.g. `content.md`) and generated files (e.g. `README.md`) for a given image reside, (e.g. `golang/`). It must match the name of the image used in `docker-library/official-images`.
7476

7577
## `README.md`
7678

77-
This file is generated using `update.sh`.
79+
This file is generated using `update.sh`. Do not commit or edit this file; it is regenerated periodically by a bot.
7880

7981
## `content.md`
8082

81-
This file contains the main content of your image's long description. The basic parts you should have are a "What Is" section and a "How To" section. See the doc on [Official Repos](https://docs.docker.com/docker-hub/official_repos/#a-long-description) for more information on long description. The issues and contribution section is generated by the script but can be overridden. The following is a basic layout:
83+
This file contains the main content of your image's long description. The basic parts you should have are a "What Is" section and a "How To" section. The following is a basic layout:
8284

8385
```markdown
8486
# What is XYZ?
@@ -93,15 +95,17 @@ This file contains the main content of your image's long description. The basic
9395
// make use of subsections as necessary
9496
```
9597

96-
## `README-short.txt`
98+
## `get-help.md`
9799

98-
This is the short description for the docker hub, limited to 100 characters in a single line.
100+
This file is an optional override of the default `get-help.md`. This is the content of the "Where to get help" part of the "Quick reference" at the top of the generated README. We recommend linking to the best places for community support like forums, chat rooms, or mailing lists.
99101

100-
> Go (golang) is a general purpose, higher-level, imperative programming language.
102+
## `github-repo`
101103

102-
## `logo.png`
104+
This file should contain the URL to the GitHub repository for the Dockerfiles that become the images. The file should be in a single line ending in a newline with no extraneous whitespace. Only one GitHub repo per image repository is supported. It is used in generating links. Here is an example for `golang`:
103105

104-
Logo for the contained software. While there are not hard rules on formatting, most existing logos are square or landscape and stay within a few hundred pixels of width.
106+
```text
107+
https://github.com/docker-library/golang
108+
```
105109

106110
## `license.md`
107111

@@ -111,48 +115,60 @@ This file should contain a link to the license for the main software in the imag
111115
View [license information](http://golang.org/LICENSE) for the software contained in this image.
112116
```
113117

118+
## `logo.png`
119+
120+
Logo for the contained software. While there are not hard rules on formatting, most existing logos are square or landscape and stay within a few hundred pixels of width. Alternatively, a `logo.svg` can be used instead, but only one logo file will apply. To use it within `content.md`, put `%%LOGO%%` as shown above in the basic `content.md` layout.
121+
122+
The image is automatically scaled to a 120 pixel square for the top of the Docker Hub page and Hub search results.
123+
114124
## `maintainer.md`
115125

116126
This file should contain a link to the maintainers of the Dockerfile.
117127

118-
## `github-repo`
128+
## `README-short.txt`
119129

120-
This file should contain the URL to the GitHub repository for the Dockerfiles that become the images. The file should be in a single line ending in a newline with no extraneous whitespace. Only one GitHub repo per image repository is supported. It is used in generating links. Here is an example for `golang`:
130+
This is the short description for the Docker Hub, limited to 100 characters in a single line.
121131

122-
```text
123-
https://github.com/docker-library/golang
124-
```
132+
> Go (golang) is a general purpose, higher-level, imperative programming language.
125133
126-
## `user-feedback.md`
134+
## `stack.yml`
127135

128-
This file is an optional override of the default `user-feedback.md` for those repositories with different issue and contributing policies.
136+
This optional file contains a small, working [Compose file for Docker Swarm](https://docs.docker.com/compose/compose-file/compose-file-v3/) showing off how to use the image. To use the `stack.yml`, add `%%STACK%%` to the `content.md` and this will embed the YAML along with a link to directly try it in [Play with Docker](https://labs.play-with-docker.com/).
137+
138+
The file must work via `docker stack deploy` since that is how Play with Docker will launch it, but it is helpful for users to try locally if it works for `docker-compose` as well. Other official images may be referenced within the YAML to demonstrate the functionality of the image, but no images external to the Docker Official Images program may be referenced.
129139

130140
# Files for main Docs repo
131141

132142
## `update.sh`
133143

134-
This is the main script used to generate the `README.md` files for each image. The generated file is committed along with the files used to generate it (see below on what customizations are available). Accepted arguments are which image(s) you want to update or no arguments to update all of them.
144+
This is the main script used to generate the `README.md` files for each image. The generated file is committed along with the files used to generate it. Accepted arguments are which image(s) you want to update or no arguments to update all of them.
135145

136146
This script assumes [`bashbrew`](https://github.com/docker-library/official-images/tree/81e90ca8dcec892ade7eb348cba5a4a5d6851e17/bashbrew) is in your `PATH` (for scraping relevant tag information from the library manifest file for each repository).
137147

138-
## `generate-repo-stub-readme.sh`
139-
140-
This is used to generate a simple `README.md` to put in the image's repo. Argument is the name of the image, like `golang` and it then outputs the readme to standard out.
148+
## `markdownfmt.sh` and `ymlfmt.sh`
141149

142-
## `push.pl`
143-
144-
This is used by us to push the actual content of the READMEs to the Docker Hub as special access is required to modify the Hub description contents.
150+
These two scripts are for verifying the formatting of Markdown (`.md`) and YAML (`.yml`) files, respectively. `markdownfmt.sh` uses the [`tianon/markdownfmt`](https://hub.docker.com/r/tianon/markdownfmt) image and `ymlfmt.sh` uses the [`tianon/ymlfmt`](https://hub.docker.com/r/tianon/ymlfmt) image.
145151

146152
## `.template-helpers/generate-dockerfile-links-partial.sh`
147153

148154
This script is used by `update.sh` to create the "Supported tags and respective `Dockerfile` links" section of each generated `README.md` from the information in the [official-images `library/` manifests](https://github.com/docker-library/official-images/tree/master/library).
149155

150-
## `.template-helpers/template.md` and `.template-helpers/user-feedback.md`
156+
## `.template-helpers/`
157+
158+
The scripts and Markdown files in here are used in building an image's `README.md` file in combination with its individual files.
159+
160+
# Scripts unrelated to templates
161+
162+
## `generate-repo-stub-readme.sh`
163+
164+
This is used to generate a simple `README.md` to put in the image's repo. We use this in Git repositories within https://github.com/docker-library to simplify our maintenance, but it is not required for anyone else. Argument is the name of the image, like `golang` and it then outputs the readme to standard out.
165+
166+
## `push.pl` and `push.sh`
151167

152-
These files are the templates used in building the `<image name>/README.md` file, in combination with the individual image's files.
168+
These are used by us to push the actual content of the READMEs to the Docker Hub as special access is required to modify the Hub description contents. The `Dockerfile` is used to create a suitable environment for `push.pl`.
153169

154170
# Issues and Contributing
155171

156172
If you would like to make a new Official Image, be sure to follow the [guidelines](https://docs.docker.com/docker-hub/official_repos/).
157173

158-
Feel free to make a pull request for fixes and improvements to current documentation. For questions or problems on this repo come talk to us via the `#docker-library` IRC channel on [Freenode](https://freenode.net) or open up an issue.
174+
Feel free to make a pull request for fixes and improvements to current documentation. For questions or problems on this repo come talk to us via the `#docker-library` IRC channel on [Libera.Chat](https://libera.chat/) or open up an issue.

push.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ sub prompt_for_edit {
186186
qw( convert -background none -density 1200 -strip -resize 120x120> -gravity center -extent 120x120 ),
187187
$logoToConvert,
188188
$repoLogo120,
189-
) == 0 or die "failed to convert $repoLogoPng into $repoLogo120";
189+
) == 0 or die "failed to convert $logoToConvert into $repoLogo120";
190190
}
191191
}
192192
if (-f $repoLogo120) {

0 commit comments

Comments
 (0)