1538 Commits

Author SHA1 Message Date
71bcd9891d Add format to podman machine info
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
581611844d Add format table to podman image inspect man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
2718f54a29 Merge pull request #17729 from rhatdan/selinux
Support running nested SELinux container separation
2023-03-15 12:07:03 -04:00
ea2a0767ac fix: Document removing anonymous volumes
Signed-off-by: Marek Czernek <mczernek@redhat.com>
2023-03-15 10:35:21 +01:00
4562e61d20 podman events: unhide --stream
The --stream flag is being used extensively in the tests and some blog
posts refer to it which has been causing some confusion on why the flag
was hidden.  I do not see a good reason to hide it anymore, so unhide it
and add some docs.

[NO NEW TESTS NEEDED] as it's already being tested.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-14 11:26:50 +01:00
ad8a96ab95 Support running nested SELinux container separation
Currently Podman prevents SELinux container separation,
when running within a container. This PR adds a new
--security-opt label=nested

When setting this option, Podman unmasks and mountsi
/sys/fs/selinux into the containers making /sys/fs/selinux
fully exposed. Secondly Podman sets the attribute
run.oci.mount_context_type=rootcontext

This attribute tells crun to mount volumes with rootcontext=MOUNTLABEL
as opposed to context=MOUNTLABEL.

With these two settings Podman inside the container is allowed to set
its own SELinux labels on tmpfs file systems mounted into its parents
container, while still being confined by SELinux. Thus you can have
nested SELinux labeling inside of a container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-13 14:21:12 -04:00
cb3cda55f2 Quadlet: add support for setting --ip and --ip6
Signed-off-by: restitux <restitux@ohea.xyz>
2023-03-06 18:36:41 -07:00
8457bb5542 Merge pull request #16717 from umohnani8/detach
play kube: Add --wait option
2023-03-01 16:46:54 +01:00
3cab05aa3e Merge pull request #17656 from ygalblum/quadlet-container-mount
Quadlet: Add support for the Mount key in .container files
2023-03-01 09:21:09 +01:00
02a77d27a2 Merge pull request #17450 from danishprakash/add-group-entry
create: add entry to /etc/group via `--group-entry`
2023-02-28 21:59:59 +01:00
20a42d0e4f play kube: Add --wait option
Add a way to keep play kube running in the foreground and terminating all pods
after receiving a a SIGINT or SIGTERM signal. The pods will also be
cleaned up after the containers in it have exited.
If an error occurrs during kube play, any resources created till the
error point will be cleane up also.

Add tests for the various scenarios.

Fixes #14522

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-02-28 13:45:36 -05:00
db53f38711 Merge pull request #17457 from hasan4791/issue-15830
[CI:DOCS] Document update for docker network options via CLI
2023-02-28 19:33:09 +01:00
ccc5aa59a0 Quadlet: Add support for the Mount key in .container files
Handle the Mount key
Reuse code from the handling of the Volume key
Add E2E Test
E2E Test - Add checker for KeyValue string
Update man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-28 16:14:19 +02:00
1cfb29d8ed Merge pull request #17602 from vyasgun/pr/context
docs: context is not optional for build
2023-02-23 13:48:36 +01:00
49d560e1b0 docs: context is not optional for build
[NO NEW TESTS NEEDED]

Closes: https://github.com/containers/podman/issues/17568
Signed-off-by: vyasgun <vyasgun20@gmail.com>
2023-02-23 09:18:51 +05:30
c4fe0af2aa Remove --namespace flag from Podman root
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
7f5fc04b4b Doc update for docker network options via CLI
Doc update to support docker-specific network create options via CLI

Closes: #15830

Signed-off-by: T K Chandra Hasan <t.k.chandra.hasan@ibm.com>
2023-02-21 21:48:17 +05:30
40f21da0c6 Apply suggestions to man page
Change podman to Podman
Add a period at the end of all sentences

Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-21 15:37:58 +02:00
6a3757b73a Quadlet: Add support for LogDriver key in container and kube units
Allow the user to set the log driver while keeping the default of passthrough

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-21 11:56:35 +02:00
b8b386b7ea Merge pull request #17522 from giuseppe/relative-idmapping
libpod: support relative positions for idmaps
2023-02-20 12:54:45 +01:00
8d9517c38f Merge pull request #17508 from vrothberg/fix-17181
auto-update: support pods
2023-02-20 12:51:43 +01:00
2e0ee6ed50 Merge pull request #17561 from TomSweeneyRedHat/dev/tsweeney/optionreadme
[CI:DOCS] Add restriction to option README
2023-02-19 20:56:58 +01:00
9ce589a4a8 Fix spacing typo that triggered OCD & indent units in podman-systemd.unit(5)
Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2023-02-19 19:56:35 +05:30
e74f60deea [CI:DOCS] Add restriction to option README
Add a note about the restriction of the use of
thre back-ticks in the md files in the options directory.
If this is not done properly, it can quietly corrupt
the compliled man pages.

[NO NEW TESTS NEEDED]
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-02-17 16:29:55 -05:00
6dd7978442 auto-update: support pods
Support auto updating containers running inside pods.  Similar to
containers, the systemd units need to be generated via
`podman-generate-systemd --new $POD` to generate the pod's units.

Note that auto updating a container inside a pod will restart the entire
pod.  Updates of multiple containers inside a pod are batched, such that
a pod is restarted at most once.  That is effectively the same mechanism
for auto updating containers in a K8s YAML via the `podman-kube@`
template or via Quadlet.

Updating a single container unit without restarting the entire pod is
not possible.  The reasoning behind is that pods are created with
--exit-policy=stop which will render the pod to be stopped when auto
updating the only container inside the pod.  The (reverse) dependencies
between the pod and its containers unit have been carefully selected for
robustness.  Changes may entail undesired side effects or backward
incompatibilities that I am not comfortable with.

Fixes: #17181
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-17 10:31:28 +01:00
9622d25be9 Emergency fix for man pages: check for broken includes
Somehow the options/secret.md file generated corrupt md which
then generated corrupt .man files. Fix, and add a Makefile
check to prevent this from happening again.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-16 18:54:38 -07:00
96af9e4e0f libpod: support relative positions for idmaps
we were previously using an experimental feature in crun, but we lost
this capability once we moved to using the OCI runtime spec to specify
the volume mappings in fdcc2257df0fb0cb72d3fbe1b5aa8625955e1219.

Add the same feature to libpod, so that we can support relative
positions for the idmaps.

Closes: https://github.com/containers/podman/issues/17517

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-02-16 10:33:51 +01:00
7b590d4c6d Merge pull request #17494 from ashley-cui/osapply
Introduce podman machine os apply
2023-02-15 17:14:17 -05:00
9abe8c7853 Introduce podman machine os apply
Podman machine os apply takes a takes a OCI image with container native ostree functionality and rebases the machine os on that image.
Currently, this requires the guest os inside the vm to use rpm-ostree.

When specifying an image, any container transport may be specified. If a
container transport is not specified, OS apply will attempt to search
the local containers-storage for the image, and if it is not found, it
will then attempt to use the Docker transport to pull from a remote
registry.

The architecture of OS apply is as follows:
podman machine os apply ssh's into the machine and calls podman machine os
apply. on the secondary call to podman machine os apply, apply
recognizes that it is inside the machine and does image operations, and
finally calls rpm-ostree rebase.

Tests are written but commented out, due to the chicken-and-egg problem.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-02-15 14:48:12 -05:00
eb75246f31 Merge pull request #17207 from danishprakash/add-systemd-shm-size
add support for limiting tmpfs size for systemd-specific mnts
2023-02-15 05:53:40 -05:00
828708bac2 create: add support for --group-entry
* add test
* update documentation

Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-02-15 11:20:18 +05:30
3a9d14d4e9 man page --format xref: tighten the autocompletion check
Followup to #17486: stricter checks on --format.

  * If a subcommand offers autocompletion for templates,
    it must also offer a '--format json' option.

  * If a subcommand has a --format option that DOES NOT
    offer autocompletion for templates, it must be listed
    in a hardcoded grandparented-in table of commands
    where that's not applicable. (Mostly commands
    like build, commit, save, where "format" is used
    in the context of "oci/docker").

Only likely to trigger on PRs which add new subcommands,
and is intended to catch oversights.

Also, test for alphanumeric order in man page tables.
Sort all existing tables.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-14 08:11:54 -07:00
0999991b20 add support for limiting tmpfs size for systemd-specific mnts
* add tests
* add documentation for --shm-size-systemd
* add support for both pod and standalone run

Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-02-14 14:56:09 +05:30
72addc46c3 Merge pull request #17424 from salevdns/patch-2
[CI:DOCS] Clarify nomap constrains
2023-02-13 13:11:59 -05:00
34d412e13d man page xref: validate displayed man page names
command tables are chock full of duplication, hence they break.
Look for inconsistencies between the displayed man page name
and the actual man page name:

    |  foo    | [podman-foo(1)](podman-cmd-foo.1.md) | ...
                        ^^^

Inspired by #17474.

We can't actually check the subcommand name (the plain "foo")
because there are many existing subcommands whose name does
not match the man page: rmi vs image-rm, list vs podman-ps.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-13 07:54:57 -07:00
a5ca732256 Fix typos
Software version used
https://github.com/crate-ci/typos/releases/tag/v1.13.10

The binary was downloaded from
https://github.com/crate-ci/typos/releases/download/v1.13.10/typos-v1.13.10-x86_64-unknown-linux-musl.tar.gz

Command that was run:

typos --write-changes docs cmd cni contrib dependencies docs hack libpod pkg utils

False positives were manually removed.
A few marshaling/existant typos were manually fixed.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-02-11 18:23:24 +01:00
f0d863e5cc Merge pull request #17443 from edsantiago/xref_format_baby_steps
[CI:DOCS] man-page checker: include --format (Go templates)
2023-02-09 14:23:34 -05:00
09e853b14d Merge pull request #17409 from EvaristeGalois11/fix-doc-podman-commit
[CI:DOCS] Fix contradicting documentation podman commit --pause
2023-02-09 07:54:49 -05:00
7f2b4234c7 Merge pull request #17440 from rhatdan/man
[CI:DOCS] Cleanup some man pages to display options with line breaks
2023-02-09 04:38:42 -05:00
fb54be2e17 [CI:DOCS] Clarify nomap constrains
Signed-off-by: salevdns <24809481+salevdns@users.noreply.github.com>
2023-02-09 10:35:43 +01:00
4334135491 [CI:DOCS] man-page checker: include --format (Go templates)
Very belated successor to #14046.

I don't know why this is so important to me. Probably because we're
doing a halfhearted sloppy job of documenting, and new options get
added, and not documented, and that's just wrong.

I've given up on documenting internal structs. This iteration
has a $Format_Exceptions table defined at the top of the xref
script, enumerating a hardcoded defined set of podman commands
and fields that should remain undocumented.

This iteration also forgives completely-undocumented formats.
If podman-foo has a --format, but podman-foo.1.md does not
list *any* valid fields, the script warns but does not fail.
This at least is better than documenting a random mix of fields.

This version of the xref script is much slower: 10s vs 4. I
think we can live with that in a CI-only script.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-08 15:33:45 -07:00
d1fd399455 Merge pull request #17438 from rhatdan/quadlet
[CI:DOCS] Add tables to podman-systemd.unit man page
2023-02-08 15:54:28 -05:00
ec4ab08c8b [CI:DOCS] Cleanup some man pages to display options with line breaks
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-08 14:46:44 -05:00
5ed2174097 [CI:DOCS] Add tables to podman-systemd.unit man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-08 14:19:32 -05:00
d6dd17fdfe Quadlet: Add support for the Secret key in Container group
Add E2E tests
Add system test
Add to man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-08 16:12:08 +02:00
3f45a8babf Merge pull request #17401 from vrothberg/docs-events-journald
[CI:DOCS] events: document journald identifiers
2023-02-07 20:52:20 -05:00
90eb834e7c #17363 Fix contradicting documentation podman-commit
Signed-off-by: Claudio Nave <claudionave97@gmail.com>
2023-02-07 16:23:07 +01:00
1fd0ce71d0 [CI:DOCS] events: document journald identifiers
Document the identifiers used in the journald events backend. Those can
be used to filter Podman events with journalctl and I need them to be
documented for a blog I am writing at the moment.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-07 13:56:43 +01:00
4e8906c5e5 docs/podman-systemd.unit: Explicitely mention network & kube units
Make the relation between '.container' and '.network' units more
explicit at the beginning.

Signed-off-by: Timothée Ravier <tim@siosm.fr>
2023-02-06 22:47:41 +01:00
c4f338eec7 docs/podman-systemd.unit: Update example to work out of the box
- Don't order the container unit before local-fs.target as that creates
  an ordering cycle that triggers other issues.
- Use the example network in the container unit
- Only use groups that exists by default for the volume

Signed-off-by: Timothée Ravier <tim@siosm.fr>
2023-02-06 22:47:41 +01:00