18 Commits

Author SHA1 Message Date
32c2cea0f9 Remove future tense from man pages
Remove all will, would, could, should and use present tense.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-16 15:10:33 -04:00
90eb834e7c #17363 Fix contradicting documentation podman-commit
Signed-off-by: Claudio Nave <claudionave97@gmail.com>
2023-02-07 16:23:07 +01:00
63c779a857 Fix manpage headers
Signed-off-by: Andrew Denton <adenton@redhat.com>
2022-09-06 09:37:13 -07:00
ad7c54e13a man page checker: enforce stricter options format
Followup to #14906, in which a nonexistent option was found
in a man page. The xref script was designed to catch that,
but I was too lax in my parsing: the option was documented
using wrong syntax, and the script didn't catch it.

Solution: do not allow *any* unrecognized cruft in the
option description lines. And fix all improperly-written
entries to conform to the rule:

    **--option**=*value(s)*

Two asterisks around option, which must have two dashes. One
asterisk around value(s).

This is going to cause headaches for some people adding new
options, but I don't think I can fix that: there are many
factors that make an unparseable line. Adding 'hint' code
would make the script even more complex than it is. I have
to assume that our contributors are smart enough to look
at surrounding context and figure out the right way to
specify options.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-14 06:35:51 -06:00
9b0c8d23bd 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 <santiago@redhat.com>
2022-03-23 13:49:42 -06:00
fbbcb957c7 container-commit: support --squash to squash layers into one
Allow users to commit containers into a single layer.

Usage
```bash
podman container commit --squash <name>
```

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-23 17:38:28 +05:30
e344a5899f [CI:DOCS] UPDATE manpages with MANPAGE_SYNTAX
MANPAGE_SYNTAX was edited.

The following manpages have been adapted to the MANPAGE_SYNTAX:
- podman-container-prune
- podman-container-restore

The following manpages have had little changes:
- podman-attach
- podman-auto-update
- podman-commit
- podman-completion
- podman-container-checkpoint
- podman-container-cleanup
- podman-container-exists

Signed-off-by: Alexander Richter <67486332+Procyhon@users.noreply.github.com>
2021-06-16 17:44:11 +02:00
4bca1984a5 UPDATE manpages with MANPAGE_SYNTAX
The following manpages have been adapted to the MANPAGE_SYNTAX:
- podman-completion
- podman-container-checkpoint
- podman-container-cleanup
- podman-container-exists

The following manpages have had little changes:
- podman-attach
- podman-commit
- MANPAGE_SYNTAX
- Makefile

Signed-off-by: Alexander Richter <67486332+Procyhon@users.noreply.github.com>
2021-06-12 18:50:20 +02:00
ab7e7f651e UPDATE MANPAGE_SYNTAX (commit,attach,auto-update)
Updated version for the MANPAGE_SYNTAX and adaption of the syntax for
the manpages of podman-commit, podman-attach, and podman-auto-update.

Signed-off-by: Alexander Richter <67486332+Procyhon@users.noreply.github.com>
2021-06-06 12:32:05 +02:00
30e731ecc8 Revert escaped double dash man page flag syntax
Commit 800a2e2d35 introduced a way to disable the conversion of `--`into
an en dash on docs.podman.io, so the ugly workaround of escaping the
dashes is no longer necessary.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-07 18:30:00 +02:00
bc48211924 Fix long option format on docs.podman.io
Escape the two dashes, otherwise they are combined into one long dash.
I tested that this change is safe and still renders correctly on github
and with the man pages.

This commit also contains a small change to make it build locally.
Assuming you have the dependencies installed you can do:
```
cd docs
make html
```
Preview the html files in docs/build/html with
`python -m http.server 8000 --directory build/html`.

Fixes containers/podman.io#373

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-29 14:38:25 +02:00
52a8694705 Add anchors for flag names on docs.podman.io
Change the docs markdown so that flag names will be h4 headers.
Sphinx will automatically add anchors to headers. Add css to
make sure the flag names are not to big compared to the text.

The man pages also still renders fine but it looks a bit different.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-10 15:27:08 +01:00
5efa6dae90 Implemented --iidfile for podman commit
Added flag to Write the image ID to the file with podman commit command.
Fix to issue #5461

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-03-19 16:32:02 -04:00
3d1bff6db9 man page cross-reference fixes: part 2
The other direction: fix or clean up elements documented in
man pages but which did/do not exist in actual podman:

  * runlabel: add missing "-n" alias for --name

And, remove man page entries for nonexistent options:

  * podman commit: --iidfile
  * podman container runlabel: --rootfs, --storage
  * podman create: --cpu-count

There are two problems I don't know how to deal with. Both
are related to main_local.go:rootCmd.PersistentFlags() :

  1) podman-build.1.md documents --cni-config-dir and
     --runtime options, but these are not actually options
     under podman build; they are global options. The
     documentation in this man page differs from that
     under podman-build.

  2) podman ps implements a binary --namespace option,
     but this option does not (cannot?) appear in --help
     because there's a global --namespace string option
     and Cobra somehow gets confused about this.

Do we really intend for global options to be parsed on
the right-hand side of subcommands? This strikes me as
unintuitive and potentially confusing, although the
fact that it has taken me this long to discover it
suggests that it's not _that_ confusing.

Suggestions welcome. I can file issues for 1/2 above,
or simply teach my script to special-case ignore them.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-11 11:05:37 -06:00
b163640c61 Allow devs to set labels in container images for default capabilities.
This patch allows users to specify the list of capabilities required
to run their container image.

Setting a image/container label "io.containers.capabilities=setuid,setgid"
tells podman that the contained image should work fine with just these two
capabilties, instead of running with the default capabilities, podman will
launch the container with just these capabilties.

If the user or image specified capabilities that are not in the default set,
the container will print an error message and will continue to run with the
default capabilities.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-02 16:37:32 -05:00
59c91069c0 Update documentation of commit command to show image reference is optional
Following
Commit ba1d1304a67b ("make image reference for commit optional")

Updates usage text used by cobra and markdown document used to generate MAN page.

Fixes: #5145

Signed-off-by: Allan Jacquet-Cretides <allan.jacquet@gmail.com>
2020-02-15 11:11:00 +01:00
9bbf08de25 make image reference for commit optional
to match docker compat, the image tag should be optional.

Fixes: #5027

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-01-30 09:51:59 -06:00
486fcd4e1e Update document formatting and packaging code
* Refactored code and Makefile to support new docs layout
* Removed some old code packaging code
* Add Readme.md to document what we're doing

Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: baude <bbaude@redhat.com>
2019-10-31 12:31:39 -05:00