Skip to content

Commit 9b0c8d2

Browse files
committed
man pages: sort flags, and keep them that way
Command flags (OPTIONS) in man pages have to date been in haphazard order. Sometimes that order is sensible, e.g., most-important options first, but more often they're just in arbitrary places. This makes life hard for users. Here, I update the man-page-check Makefile script so it checks and enforces alphabetical order in OPTIONS sections. Then -- the hard part -- update all existing man pages to conform to this requirement. Signed-off-by: Ed Santiago <[email protected]>
1 parent 7371306 commit 9b0c8d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+605
-590
lines changed

docs/source/markdown/podman-build.1.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -312,23 +312,23 @@ environment variable. `export BUILDAH_FORMAT=docker`
312312
Overrides the first `FROM` instruction within the Containerfile. If there are multiple
313313
FROM instructions in a Containerfile, only the first is changed.
314314

315-
**-h**, **--help**
315+
#### **--help**, **-h**
316316

317317
Print usage statement
318318

319319
#### **--http-proxy**
320320

321321
Pass through HTTP Proxy environment variables.
322322

323+
#### **--ignorefile**
324+
325+
Path to an alternative .containerignore file.
326+
323327
#### **--iidfile**=*ImageIDfile*
324328

325329
Write the built image's ID to the file. When `--platform` is specified more
326330
than once, attempting to use this option will trigger an error.
327331

328-
#### **--ignorefile**
329-
330-
Path to an alternative .containerignore file.
331-
332332
#### **--ipc**=*how*
333333

334334
Sets the configuration for IPC namespaces when handling `RUN` instructions.
@@ -643,47 +643,62 @@ the user namespace in which `podman` itself is being run should be reused, or
643643
it can be the path to a user namespace which is already in use by another
644644
process.
645645

646-
#### **--userns-uid-map**=*mapping*
646+
#### **--userns-gid-map**=*mapping*
647647

648-
Directly specifies a UID mapping which should be used to set ownership, at the
648+
Directly specifies a GID mapping which should be used to set ownership, at the
649649
filesystem level, on the working container's contents.
650650
Commands run when handling `RUN` instructions will default to being run in
651651
their own user namespaces, configured using the UID and GID maps.
652652

653653
Entries in this map take the form of one or more triples of a starting
654-
in-container UID, a corresponding starting host-level UID, and the number of
654+
in-container GID, a corresponding starting host-level GID, and the number of
655655
consecutive IDs which the map entry represents.
656656

657-
This option overrides the *remap-uids* setting in the *options* section of
657+
This option overrides the *remap-gids* setting in the *options* section of
658658
/etc/containers/storage.conf.
659659

660-
If this option is not specified, but a global --userns-uid-map setting is
660+
If this option is not specified, but a global --userns-gid-map setting is
661661
supplied, settings from the global option will be used.
662662

663-
If none of --userns-uid-map-user, --userns-gid-map-group, or --userns-uid-map
664-
are specified, but --userns-gid-map is specified, the UID map will be set to
665-
use the same numeric values as the GID map.
663+
If none of --userns-uid-map-user, --userns-gid-map-group, or --userns-gid-map
664+
are specified, but --userns-uid-map is specified, the GID map will be set to
665+
use the same numeric values as the UID map.
666666

667-
#### **--userns-gid-map**=*mapping*
667+
#### **--userns-gid-map-group**=*group*
668668

669-
Directly specifies a GID mapping which should be used to set ownership, at the
669+
Specifies that a GID mapping which should be used to set ownership, at the
670+
filesystem level, on the working container's contents, can be found in entries
671+
in the `/etc/subgid` file which correspond to the specified group.
672+
Commands run when handling `RUN` instructions will default to being run in
673+
their own user namespaces, configured using the UID and GID maps.
674+
If --userns-uid-map-user is specified, but --userns-gid-map-group is not
675+
specified, `podman` will assume that the specified user name is also a
676+
suitable group name to use as the default setting for this option.
677+
678+
**NOTE:** When this option is specified by a rootless user, the specified
679+
mappings are relative to the rootless user namespace in the container, rather
680+
than being relative to the host as it would be when run rootfull.
681+
682+
#### **--userns-uid-map**=*mapping*
683+
684+
Directly specifies a UID mapping which should be used to set ownership, at the
670685
filesystem level, on the working container's contents.
671686
Commands run when handling `RUN` instructions will default to being run in
672687
their own user namespaces, configured using the UID and GID maps.
673688

674689
Entries in this map take the form of one or more triples of a starting
675-
in-container GID, a corresponding starting host-level GID, and the number of
690+
in-container UID, a corresponding starting host-level UID, and the number of
676691
consecutive IDs which the map entry represents.
677692

678-
This option overrides the *remap-gids* setting in the *options* section of
693+
This option overrides the *remap-uids* setting in the *options* section of
679694
/etc/containers/storage.conf.
680695

681-
If this option is not specified, but a global --userns-gid-map setting is
696+
If this option is not specified, but a global --userns-uid-map setting is
682697
supplied, settings from the global option will be used.
683698

684-
If none of --userns-uid-map-user, --userns-gid-map-group, or --userns-gid-map
685-
are specified, but --userns-uid-map is specified, the GID map will be set to
686-
use the same numeric values as the UID map.
699+
If none of --userns-uid-map-user, --userns-gid-map-group, or --userns-uid-map
700+
are specified, but --userns-gid-map is specified, the UID map will be set to
701+
use the same numeric values as the GID map.
687702

688703
#### **--userns-uid-map-user**=*user*
689704

@@ -700,21 +715,6 @@ suitable user name to use as the default setting for this option.
700715
mappings are relative to the rootless user namespace in the container, rather
701716
than being relative to the host as it would be when run rootfull.
702717

703-
#### **--userns-gid-map-group**=*group*
704-
705-
Specifies that a GID mapping which should be used to set ownership, at the
706-
filesystem level, on the working container's contents, can be found in entries
707-
in the `/etc/subgid` file which correspond to the specified group.
708-
Commands run when handling `RUN` instructions will default to being run in
709-
their own user namespaces, configured using the UID and GID maps.
710-
If --userns-uid-map-user is specified, but --userns-gid-map-group is not
711-
specified, `podman` will assume that the specified user name is also a
712-
suitable group name to use as the default setting for this option.
713-
714-
**NOTE:** When this option is specified by a rootless user, the specified
715-
mappings are relative to the rootless user namespace in the container, rather
716-
than being relative to the host as it would be when run rootfull.
717-
718718
#### **--uts**=*how*
719719

720720
Sets the configuration for UTS namespaces when handling `RUN` instructions.

docs/source/markdown/podman-commit.1.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ Set commit message for committed image.\
6060
Pause the container when creating an image.\
6161
The default is **false**.
6262

63-
#### **--squash**, **-s**
63+
#### **--quiet**, **-q**
6464

65-
Squash newly built layers into a single new layer.\
65+
Suppresses output.\
6666
The default is **false**.
6767

68-
#### **--quiet**, **-q**
68+
#### **--squash**, **-s**
6969

70-
Suppresses output.\
70+
Squash newly built layers into a single new layer.\
7171
The default is **false**.
7272

7373
## EXAMPLES

docs/source/markdown/podman-container-checkpoint.1.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ to import the *container* on another system and thus enabling container live
3535
migration. This checkpoint archive also includes all changes to the *container's*
3636
root file-system, if not explicitly disabled using **--ignore-rootfs**.
3737

38+
#### **--file-locks**
39+
40+
Checkpoint a *container* with file locks. If an application running in the container
41+
is using file locks, this OPTION is required during checkpoint and restore. Otherwise
42+
checkpointing *containers* with file locks is expected to fail. If file locks are not
43+
used, this option is ignored.\
44+
The default is **false**.
45+
3846
#### **--ignore-rootfs**
3947

4048
If a checkpoint is exported to a tar.gz file it is possible with the help of **--ignore-rootfs** to explicitly disable including changes to the root file-system into the checkpoint archive file.\
@@ -119,14 +127,6 @@ restore. Defaults to not checkpointing *containers* with established TCP
119127
connections.\
120128
The default is **false**.
121129

122-
#### **--file-locks**
123-
124-
Checkpoint a *container* with file locks. If an application running in the container
125-
is using file locks, this OPTION is required during checkpoint and restore. Otherwise
126-
checkpointing *containers* with file locks is expected to fail. If file locks are not
127-
used, this option is ignored.\
128-
The default is **false**.
129-
130130
#### **--with-previous**
131131

132132
Check out the *container* with previous criu image files in pre-dump. It only works on `runc 1.0-rc3` or `higher`.\

docs/source/markdown/podman-container-clone.1.md

+54-54
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,6 @@ podman\-container\-clone - Creates a copy of an existing container
1111

1212
## OPTIONS
1313

14-
#### **--name**
15-
16-
Set a custom name for the cloned container. The default if not specified is of the syntax: **<ORIGINAL_NAME>-clone**
17-
18-
#### **--destroy**
19-
20-
Remove the original container that we are cloning once used to mimic the configuration.
21-
22-
#### **--cpus**
23-
24-
Set a number of CPUs for the container that overrides the original containers CPU limits. If none are specified, the original container's Nano CPUs are used.
25-
26-
This is shorthand
27-
for **--cpu-period** and **--cpu-quota**, so only **--cpus** or either both the **--cpu-period** and **--cpu-quota** options can be set.
28-
29-
#### **--cpuset-cpus**
30-
31-
CPUs in which to allow execution (0-3, 0,1). If none are specified, the original container's CPUset is used.
32-
3314
#### **--cpu-period**=*limit*
3415

3516
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
@@ -43,6 +24,43 @@ https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-c
4324

4425
If none is specified, the original container's cpu period is used
4526

27+
#### **--cpu-quota**=*limit*
28+
29+
Limit the CPU Completely Fair Scheduler (CFS) quota.
30+
31+
Limit the container's CPU usage. By default, containers run with the full
32+
CPU resource. The limit is a number in microseconds. If a number is provided,
33+
the container will be allowed to use that much CPU time until the CPU period
34+
ends (controllable via **--cpu-period**).
35+
36+
On some systems, changing the CPU limits may not be allowed for non-root
37+
users. For more details, see
38+
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
39+
40+
If none is specified, the original container's CPU quota are used.
41+
42+
#### **--cpu-rt-period**=*microseconds*
43+
44+
Limit the CPU real-time period in microseconds
45+
46+
Limit the container's Real Time CPU usage. This option tells the kernel to restrict the container's Real Time CPU usage to the period specified.
47+
48+
This option is not supported on cgroups V2 systems.
49+
50+
If none is specified, the original container's CPU runtime period is used.
51+
52+
53+
#### **--cpu-rt-runtime**=*microseconds*
54+
55+
Limit the CPU real-time runtime in microseconds.
56+
57+
Limit the containers Real Time CPU usage. This option tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex:
58+
Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks.
59+
60+
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
61+
62+
This option is not supported on cgroup V2 systems.
63+
4664
#### **--cpu-shares**=*shares*
4765

4866
CPU shares (relative weight)
@@ -82,6 +100,17 @@ PID container CPU CPU share
82100

83101
If none are specified, the original container's CPU shares are used.
84102

103+
#### **--cpus**
104+
105+
Set a number of CPUs for the container that overrides the original containers CPU limits. If none are specified, the original container's Nano CPUs are used.
106+
107+
This is shorthand
108+
for **--cpu-period** and **--cpu-quota**, so only **--cpus** or either both the **--cpu-period** and **--cpu-quota** options can be set.
109+
110+
#### **--cpuset-cpus**
111+
112+
CPUs in which to allow execution (0-3, 0,1). If none are specified, the original container's CPUset is used.
113+
85114
#### **--cpuset-mems**=*nodes*
86115

87116
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
@@ -92,42 +121,9 @@ two memory nodes.
92121

93122
If none are specified, the original container's CPU memory nodes are used.
94123

95-
#### **--cpu-quota**=*limit*
96-
97-
Limit the CPU Completely Fair Scheduler (CFS) quota.
98-
99-
Limit the container's CPU usage. By default, containers run with the full
100-
CPU resource. The limit is a number in microseconds. If a number is provided,
101-
the container will be allowed to use that much CPU time until the CPU period
102-
ends (controllable via **--cpu-period**).
103-
104-
On some systems, changing the CPU limits may not be allowed for non-root
105-
users. For more details, see
106-
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
107-
108-
If none is specified, the original container's CPU quota are used.
109-
110-
#### **--cpu-rt-period**=*microseconds*
111-
112-
Limit the CPU real-time period in microseconds
113-
114-
Limit the container's Real Time CPU usage. This option tells the kernel to restrict the container's Real Time CPU usage to the period specified.
115-
116-
This option is not supported on cgroups V2 systems.
117-
118-
If none is specified, the original container's CPU runtime period is used.
119-
120-
121-
#### **--cpu-rt-runtime**=*microseconds*
122-
123-
Limit the CPU real-time runtime in microseconds.
124-
125-
Limit the containers Real Time CPU usage. This option tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex:
126-
Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks.
127-
128-
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
124+
#### **--destroy**
129125

130-
This option is not supported on cgroup V2 systems.
126+
Remove the original container that we are cloning once used to mimic the configuration.
131127

132128
#### **--memory**, **-m**=*limit*
133129

@@ -141,6 +137,10 @@ system's page size (the value would be very large, that's millions of trillions)
141137

142138
If no memory limits are specified, the original container's will be used.
143139

140+
#### **--name**
141+
142+
Set a custom name for the cloned container. The default if not specified is of the syntax: **<ORIGINAL_NAME>-clone**
143+
144144
#### **--run**
145145

146146
When set to true, this flag runs the newly created container after the

docs/source/markdown/podman-container-restore.1.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,14 @@ Restore all checkpointed *containers*.\
1616
The default is **false**.\
1717
*IMPORTANT: This OPTION does not need a container name or ID as input argument.*
1818

19-
#### **--keep**, **-k**
19+
#### **--file-locks**
2020

21-
Keep all temporary log and statistics files created by `CRIU` during
22-
checkpointing as well as restoring. These files are not deleted if restoring
23-
fails for further debugging. If restoring succeeds these files are
24-
theoretically not needed, but if these files are needed Podman can keep the
25-
files for further analysis. This includes the checkpoint directory with all
26-
files created during checkpointing. The size required by the checkpoint
27-
directory is roughly the same as the amount of memory required by the
28-
processes in the checkpointed *container*.\
29-
Without the **--keep**, **-k** option the checkpoint will be consumed and cannot be used again.\
21+
Restore a *container* with file locks. This option is required to
22+
restore file locks from a checkpoint image. If the checkpoint image
23+
does not contain file locks, this option is ignored. Defaults to not
24+
restoring file locks.\
3025
The default is **false**.
3126

32-
#### **--latest**, **-l**
33-
34-
Instead of providing the *container ID* or *name*, use the last created *container*. If other tools than Podman are used to run *containers* such as `CRI-O`, the last started *container* could be from either tool.\
35-
The default is **false**.\
36-
*IMPORTANT: This OPTION is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. This OPTION does not need a container name or ID as input argument.*
37-
3827
#### **--ignore-rootfs**
3928

4029
If a *container* is restored from a checkpoint tar.gz file it is possible that it also contains all root file-system changes. With **--ignore-rootfs** it is possible to explicitly disable applying these root file-system changes to the restored *container*.\
@@ -89,6 +78,25 @@ Import a pre-checkpoint tar.gz file which was exported by Podman. This option
8978
must be used with **-i** or **--import**. It only works on `runc 1.0-rc3` or `higher`.
9079
*IMPORTANT: This OPTION is not supported on the remote client, including Mac and Windows (excluding WSL2) machines.*
9180

81+
#### **--keep**, **-k**
82+
83+
Keep all temporary log and statistics files created by `CRIU` during
84+
checkpointing as well as restoring. These files are not deleted if restoring
85+
fails for further debugging. If restoring succeeds these files are
86+
theoretically not needed, but if these files are needed Podman can keep the
87+
files for further analysis. This includes the checkpoint directory with all
88+
files created during checkpointing. The size required by the checkpoint
89+
directory is roughly the same as the amount of memory required by the
90+
processes in the checkpointed *container*.\
91+
Without the **--keep**, **-k** option the checkpoint will be consumed and cannot be used again.\
92+
The default is **false**.
93+
94+
#### **--latest**, **-l**
95+
96+
Instead of providing the *container ID* or *name*, use the last created *container*. If other tools than Podman are used to run *containers* such as `CRI-O`, the last started *container* could be from either tool.\
97+
The default is **false**.\
98+
*IMPORTANT: This OPTION is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. This OPTION does not need a container name or ID as input argument.*
99+
92100
#### **--name**, **-n**=*name*
93101

94102
If a *container* is restored from a checkpoint tar.gz file it is possible to rename it with **--name, -n**. This way it is possible to restore a *container* from a checkpoint multiple times with different
@@ -149,14 +157,6 @@ option is ignored. Defaults to not restoring *containers* with established TCP
149157
connections.\
150158
The default is **false**.
151159

152-
#### **--file-locks**
153-
154-
Restore a *container* with file locks. This option is required to
155-
restore file locks from a checkpoint image. If the checkpoint image
156-
does not contain file locks, this option is ignored. Defaults to not
157-
restoring file locks.\
158-
The default is **false**.
159-
160160
## EXAMPLE
161161
Restores the container "mywebserver".
162162
```

0 commit comments

Comments
 (0)