cli icon indicating copy to clipboard operation
cli copied to clipboard

docker man pages need some love

Open kolyshkin opened this issue 6 years ago • 20 comments

Executive summary: there are a number of docker-* man pages available under man/, they all need some love.

Formatting

For one thing, formatting/typesetting needs to be cleaned up. The rules (from the top of my head) are:

  • literals (like option names, literal values like true or false, or examples) should be bold;
  • variable parts (like option values to be substituted) should be italic (note this is frequently rendered as underlined when viewing a man page in a terminal);
  • optional parts should be enclosed into square brackets;
  • in general, = between the --option and the value should be omitted;
  • angle brackets (like <value>) should not be used.

For more rules and examples, check man-pages(7).

For example, here's the correct formatting:

--memory-limit value[SUFFIX]

Sets the memory limit. SUFFIX is optional and can be one of b (bytes), k (kilobytes), m (megabytes), or g (gigabytes).

Source:

**--memory-limit** *value*[*SUFFIX*]

Sets the memory limit. *SUFFIX* is optional and can be one of
**b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).

As an example of such work, please see https://github.com/docker/cli/pull/922

kolyshkin avatar Mar 06 '18 23:03 kolyshkin

I'm happy to take this. I'll start on it tomorrow.

chriscoffee avatar Oct 07 '18 02:10 chriscoffee

Thank you for taking care of this @chriscoffee !

silvin-lubecki avatar Oct 07 '18 19:10 silvin-lubecki

@chriscoffee I suggest start with a small patch, fixing just a few things first. Don't try to fix all at once.

kolyshkin avatar Oct 08 '18 19:10 kolyshkin

@chriscoffee I suggest start with a small patch, fixing just a few things first. Don't try to fix all at once.

Sure, I'll put in some smaller PRs. Thanks for the advice 👍

chriscoffee avatar Oct 10 '18 15:10 chriscoffee

I was thinking about working on this during the weekend. Can anyone confirm that I would not be duplicating work etc. I could not find an open PR from @chriscoffee or a branch on his fork. Not sure if there are guidelines with deciding when someone else can work on something claimed by another from a quick skim thorugh the guidelines. Thanks!

Joshua-Rowe avatar Nov 09 '18 18:11 Joshua-Rowe

@Joshua-Rowe feel free to take this, apologies. I got some initial work done on it then got sidetracked with other things.

chriscoffee avatar Nov 11 '18 12:11 chriscoffee

I took a few hours here and there over the weekend to familiarize myself with man page concepts and formatting, building the Docker man pages, and looking at how generate.go does its work. I looked the Docker man pages and compared them to ones on my Mac (such as tar, vim, etc.), and then I scoped out a reasonable approach to modify what's currently in the man directory. I think I am going to start with docker-build.1.md as it is the smaller of the MD files and seek to fix the above bullet points and see if there is anything else on man7 and other internet resources that can also be addressed.

Look for a PR soon with first changes.

Joshua-Rowe avatar Nov 13 '18 00:11 Joshua-Rowe

Related discussion in https://github.com/moby/moby/issues/25615

Curious what the convention is in manpages to indicate required values, and if different kind of values are allowed. Or would that have to be explained in the description? Thinking of;

  -u, --user string                    Username or UID (format: <name|uid>[:<group|gid>])

But also the -p / --publish syntax (which is quite involved); https://github.com/moby/moby/pull/27917#issuecomment-258556920

description example
publish a container's port to an ephemeral port on the host -p 80
publish a container's port to a specific port on the host -p 1234:80
publish a container's port to an ephemeral host port within a specified range -p 8000-9000:80
publish a range of container ports to ephemeral ports on the host -p 8000-8010
publish a range of container ports to a range of host ports -p 8000-8010:9000-9010
specify the protocol to publish (udp, tcp) -p 80/udp, -p 1234:80/udp, -p 8000-9000:80/udp, -p 8000-8010/udp, -p 8000-8010:9000-9010/udp
publish the port only on specific IP-addresses -p 127.0.0.1:90:80 -p 192.168.202.120:90:80
publish a container port on an ephemeral port on a specific IP-address -p 127.0.0.1::80 (double colon means value omitted)
publish a container port to multiple ephemeral ports on a specific IP-address -p 127.0.0.1::80 -p 127.0.0.1::80

thaJeztah avatar Dec 21 '18 13:12 thaJeztah

Hi All,

I stumbled over this issue when I wanted to add a different issue for a manpage typo in docker-image-load. While I am more than happy to provide a PR I am unsure if this issue would fit better?

If you could provide some guidance in this situation, I'd be happy to hear from you.

ppxl avatar May 16 '19 09:05 ppxl

I am just realizing the last active comment was half a year ago. Is this thing still on? :thinking: I could jump in because I am using the cli manpages a lot for reference.

ppxl avatar May 17 '19 06:05 ppxl

I'll be happy to take this task, so I could start somewhere. I'll need a little guidance at first.

ghost avatar Oct 14 '19 13:10 ghost

I can definitely help on this one, please let me know if i can share this task and help. I will need some initial guidance.

devanandch avatar Jul 13 '20 14:07 devanandch

I can help here if it's still open.

HemantJoshi11 avatar Aug 28 '20 18:08 HemantJoshi11

Hey @kolyshkin , Is this work available. I would like to work on this issue.

viveksahu26 avatar Sep 25 '20 03:09 viveksahu26

I can work on it if still open.

SaNsK11 avatar Sep 21 '21 15:09 SaNsK11

Is this still open?

poiuy-trewq avatar Apr 11 '22 07:04 poiuy-trewq

I can work if it is still open ?

pspiagicw avatar Aug 08 '22 04:08 pspiagicw

i can work on this if it is still open?

root-ali avatar Sep 04 '22 12:09 root-ali

Hi! Is this still taken care of or need some help?

farathshba avatar Oct 05 '23 07:10 farathshba

@kolyshkin Hi! I am a Computer Science student at the University of Texas at Austin. I am currently taking virtualization (CS 360v) and I would like to contribute to this project. I saw this issue opened a couple years ago and I would like to work on it, but I was wondering if it was still open.

pranjalrai4 avatar Mar 29 '24 19:03 pranjalrai4