Commit Graph

2358 Commits

Author SHA1 Message Date
Brent Baude 5283f956a5 Disallow mounting to certain destination /dir paths
When certain directories, like /tmp, get mounted over, FCOS/Linux can
act in unexpected ways.  Added a sanity check for a list of directories
think might be impacted by this.  Also, moved the volume parsing earlier
in the init process so we can catch problems before the expensive
decompression of machine images.

The following destinations are forbidden for volumes:

`/bin`, `/boot`, `/dev`, `/etc`, `/home`, `/proc`, `/root`, `/run`, `/sbin`, `/sys`, `/tmp`, `/usr`, and `/var`. Subdirectories

Fixes: #18230

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-03-07 09:54:01 -06:00
Brent Baude 727542fc6c Replace old nginx image with podman hello
A user has reported that a previously used URL in our Introduction
documentation is no longer working.  It apparently has missing files and
so forth.  We now use a Containerfile that is more reliable and less
chance of change.

Fixes: #25449

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-03-05 07:48:28 -06:00
openshift-merge-bot[bot] 01feac8af5
Merge pull request #25465 from baude/issue18193
podman-import only supports gz and tar
2025-03-05 11:10:22 +00:00
Brent Baude 9e397d8e4d podman-import only supports gz and tar
according to the conversation in #18193, we only support plain tar or
gzipped tar as input.

Fixes: #18193

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-03-04 14:11:46 -06:00
Brent Baude 7f4282a7e8 Update documentation for podman-machine-os-apply
A user reported that it was a surprise to receive an unsupported os
error when trying to use `podman machine os apply` with WSL machines.
This is intentional however the documentation needed to be updated to
explicitly state why (it is not based on FCOS).

Fixes: #25435

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-03-04 13:43:15 -06:00
flouthoc 1e9bfeb1f8
docs,kube: add configMap as supported volume option
Closes: https://github.com/containers/podman/issues/25436

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-03-03 08:53:05 -08:00
Oleksandr Krutko b18dcccb28 add filter for container command
Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

add a test, improve logic of command filter

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

improve a test

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

improve test, update a man page

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

improve man page, runtime functions

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

move ExternalContainerFilter type to entities package

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

add external filters

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

add tests for external containers

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

add test for ps external id, ancestor

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

add tests for ps external filters of since, before

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

fix linter warnings, add completion for the name filter

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

resolve conflicts

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

check command length, filter containers liist by external key

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

re-write test to remove buildah usage

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
2025-03-02 19:47:44 +02:00
openshift-merge-bot[bot] 9f8fdf6a40
Merge pull request #25420 from jankaluza/24030
Add "create" and "remove" events for secrets.
2025-02-28 17:08:22 +00:00
Jan Kaluza 20523152f8 Add "create" and "remove" events for secrets.
This commit adds the "secret" Event type and emits
"create" and "remove" events for this Event type
when Secret is created or removed.

This can be used for example by podman interfaces to
view and manage secrets.

Fixes: #24030

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-02-28 16:58:06 +01:00
Jake Correnti 42fb942a6f
Introduce `podman machine cp` command
Add a new `podman machine cp` subcommand to allow users to copy files or
directories between a running Podman Machine and their host.

Tests cover the following cases:
- Copy a file from the host machine to the VM
- Copy a directory from the host machine to the VM
- Copy a file from the VM to the host machine
- Copy a directory from the VM to the host machine
- Copy a file to a directory
- Copy a directory to a file

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2025-02-28 09:56:46 -05:00
Brent Baude cbc73457ab Add --all to artifact rm
Add the ability to remove all artifacts with a --all|-a option in podman
artifact rm.

Fixes: https://issues.redhat.com/browse/RUN-2512

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-20 09:38:50 -06:00
Giuseppe Scrivano b43863ae2a
docs: warn about adding capabilities
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2345676

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-02-18 15:23:29 +01:00
Ben Boeckel 543be25ef3 quadlet: support `Memory=` in `[Container]` sections
Maps to the `--memory=` flag.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
2025-02-17 17:29:15 +01:00
Jan Rodák fdd442cbdf
Create `--append` flag to add file to existing artifact
Fixes: https://issues.redhat.com/browse/RUN-2444

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-02-12 10:33:37 +01:00
openshift-merge-bot[bot] 2f261d1e19
Merge pull request #25238 from Luap99/artifact-extract
add podman artifact extract
2025-02-11 18:47:23 +00:00
Paul Holzinger 3925a30fa7
add podman artifact extract
Add a new command to extract the blob content of the artifact store to a
local path.

Fixes https://issues.redhat.com/browse/RUN-2445

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-11 14:36:53 +01:00
Paul Holzinger 79be095795
docs: add v5.4 to API reference
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-11 14:05:00 +01:00
openshift-merge-bot[bot] 81431977e6
Merge pull request #25043 from jakecorrenti/machine-copy-files
Add `machine init --playbook`
2025-02-04 15:19:23 +00:00
Jake Correnti 297e8a3476 Add `machine init --playbook`
Allow the user to provide an Ansible playbook file on init which will
then be run on boot.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-03 16:43:04 -05:00
Brent Baude bc2763eac8 Add --noheading to artifact ls
like images and containers, it could be handy to have a --noheading
option that removes the headings on the output.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-03 10:50:46 -06:00
Brent Baude d575ae12f8 Add --no-trunc to artifact ls
added a --no-trunc flag to artifact ls, which follows what images has
done.  by default now, the ls output will have the shortened 12
character digest.  the --no-trunc will output the full digest.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-31 16:19:18 -06:00
Brent Baude bd061aa2d5 Add type and annotations to artifact add
podman artifact add now supports two new command line switches.

--type string that describes the type of artifact
--annotation string slice in the form of key=val

These new options allow users to "tag" information in on their artifacts
for any number of purposes down the line

RUN-2446

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-31 09:53:03 -06:00
openshift-merge-bot[bot] 4ea199d744
Merge pull request #25111 from hdub-tech/docs/podman-build-secrets
Improve podman build secrets docs / Makefile validatepr description
2025-01-28 14:31:51 +00:00
openshift-merge-bot[bot] 8d65d1e9e2
Merge pull request #25102 from Honny1/prune
Clean up after unexpectedly terminated build
2025-01-27 16:52:06 +00:00
openshift-merge-bot[bot] 9403c3d98d
Merge pull request #24678 from rhatdan/manifest
Add podman manifest rm --ignore
2025-01-27 14:52:05 +00:00
Jan Rodák 81eb84fdaa
Clean up after unexpectedly terminated build
The `podman system prune` command is able to remove build containers that were created during the build, but were not removed because the build terminated unexpectedly.

By default, build containers are not removed to prevent interference with builds in progress. Use the **--build** flag when running the command to remove build containers as well.

Fixes: https://issues.redhat.com/browse/RHEL-62009

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-01-27 14:21:27 +01:00
openshift-merge-bot[bot] c76c13f179
Merge pull request #25106 from Fak3/patch-1
docs: mount.md - idmapped mounts only work for root user
2025-01-27 11:36:09 +00:00
H Dub 0d2431dca2
docs: Enhance podman build --secret documentation and add examples
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2025-01-24 14:43:46 -06:00
Evstifeev Roman 016f41ab49 docs: mount.md - idmapped mounts only work for root user
As reported in #24918 and clarified in https://github.com/containers/crun/issues/1632#issuecomment-2567991631

Signed-off-by: Evstifeev Roman <someuniquename@gmail.com>
2025-01-24 14:07:49 +05:00
openshift-merge-bot[bot] 3b6c7665b9
Merge pull request #25077 from tangentsoft/quadlet-5-symlink-bypass
Quadlet 5 symlink bypass
2025-01-23 19:26:16 +00:00
Warren Young 51d599bce3 Avoid indirect links through quadlet(5)
On Linux systems, the quadlet(5) manpage points to the actual content at
podman-systemd.unit(5) but this cannot be counted on elsewhere.  In
particular, this symlink isn't installed by the macOS Brew package, and
https://docs.podman.io/en/latest/markdown/quadlet.5.html is a broken
URL.  Symlinks are also unlikely to function properly within the Windows
distribution, though this is untested speculation.

Now that an HTML link to podman-systemd.unit.5.html can be counted on to
work properly, this change also adds hyperlinks to these references.

Signed-off-by: Warren Young <wyoung@tangentsoft.com>
2025-01-22 13:19:50 -07:00
openshift-merge-bot[bot] 4cae27b625
Merge pull request #25029 from robertgzr/play-cdi
Document kube-play CDI support
2025-01-22 18:09:25 +00:00
Daniel J Walsh 5181becfde
Add podman manifest rm --ignore
When removing manifests, users should be allowed to ignore
ones that no longer exists.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-22 11:43:47 -05:00
Brent Baude d7553fabc7 podman artifact
the podman artifact verb is used to manage OCI artifacts.  the following
verbs were added to `podman artifact`:

* add
* inspect
* ls
* pull
* push
* rm

Notable items with this PR:

* all artifact commands and their output are subject to change. i.e.
  consider all of this tech preview
* there is no way to add a file to an artifact that already exists in
  the store.  you would need to delete and recreate the artifact.
* all references to artifacts names should be fully qualified names in
  the form of repo/name:tag (i.e. quay.io/artifact/foobar:latest)
* i understand that we will likely want to be able to attribute things
  like arch, etc to artifact files.  this function is not available yet.

Many thanks to Paul Holzinger for autocompletion PRs and review PRs that
fixed issues early on.

Also fix up some Args function to specify the correct number of args.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-21 12:47:30 -06:00
Valentin Rothberg 34d42514f1 compose docs: fix typo
Fix the typo s/provider/providers/ and give a concrete example to avoid
pitfalls such as the on in #25023.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2025-01-17 08:30:45 +01:00
openshift-merge-bot[bot] a3bb0a1a2f
Merge pull request #25008 from rhatdan/hostname
Add --no-hostname option
2025-01-16 17:14:40 +00:00
openshift-merge-bot[bot] 1a43077d99
Merge pull request #25019 from vmsh0/docs-initialized-state
docs: add 'initialized' state to status filters
2025-01-16 16:36:14 +00:00
Robert Günzler d4f4cf0988
Document kube-play CDI support
Follow up to ec6b0355bf

Signed-off-by: Robert Günzler <r@gnzler.io>
2025-01-16 15:41:16 +01:00
Erik Sjölund e93f0acbee
docs: Add quadlet debug method systemd-analyze
Reference: https://github.com/containers/podman/discussions/24891

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2025-01-16 08:27:47 +01:00
Riccardo Paolo Bestetti 6ad4742ba8
docs: add 'initialized' state to status filters
Previously, the 'initialized' state was not documented as an available
filter for various Podman commands.

This commit documents 'initialized' as a valid state that can be used to
filter the start, stop, restart, rm, pause, unpause, and ps commands.

Fixes: #25017
Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
2025-01-15 19:28:27 +01:00
Daniel J Walsh 6565bde6e8
Add --no-hostname option
Fixes: https://github.com/containers/podman/issues/25002

Also add the ability to inspect containers for
UseImageHosts and UseImageHostname.

Finally fixed some bugs in handling of --no-hosts for Pods,
which I descovered.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-15 06:51:32 -05:00
openshift-merge-bot[bot] 2e1e7107b7
Merge pull request #24882 from giuseppe/keep-id-size
namespaces: allow configuring keep-id userns size
2025-01-08 18:29:05 +00:00
Giuseppe Scrivano b0b1d19723
namespaces: allow configuring keep-id userns size
Introduce a new option "size" to configure the maximum size of the
user namespace configured by keep-id.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-01-08 10:08:29 +01:00
Daniel J Walsh 418ea52e06
Document .build for Image .container option
$NAME.build is supported in .container to automatically build the
local image. This needs to be documented.

Also fix up other special cases to look the same in the man page.

Fixes: https://www.reddit.com/r/podman/comments/1hmhhhi/quadlet_build_units/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-07 14:20:43 -05:00
openshift-merge-bot[bot] 5550e1fd83
Merge pull request #24935 from swestersund/patch-1
Fix slirp4netns typo in podman-network.1.md
2025-01-06 16:12:47 +00:00
Simon Westersund 53e5e402aa Fix slirp4netns typo in podman-network.1.md
Signed-off-by: Simon Westersund <swestersund@users.noreply.github.com>
2025-01-04 20:04:59 +02:00
Odilon Sousa d1a3f96cbf Add support to ShmSize in Pods with Quadlet
This closes #22915

Signed-off-by: Odilon Sousa <osousa@redhat.com>
2024-12-30 12:33:00 -03:00
Michael Zimmermann e608874004 docs: improve documentation for internal networks
This goes into more detail about what this option actually does.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2024-11-26 14:24:44 +01:00
Michael Zimmermann 697c4181d2 docs: document bridge mode option
Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2024-11-26 14:24:44 +01:00
Gavin Lam 4f7395f93a
Add --hosts-file flag to container and pod commands
* Add --hosts-file flag to container create, container run and pod create
* Add HostsFile field to pod inspect and container inspect results
* Test BaseHostsFile config in containers.conf

Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2024-11-24 22:00:34 -05:00
openshift-merge-bot[bot] d85ac938e6
Merge pull request #24442 from Honny1/change-healthcheck-config-via-podman-update
Configure HealthCheck with `podman update`
2024-11-22 15:57:30 +00:00
Jan Rodák a1249425bd
Configure HealthCheck with `podman update`
New flags in a `podman update` can change the configuration of HealthCheck when the container is started, without having to restart or recreate the container.

This can help determine why a given container suddenly started failing HealthCheck without interfering with the services it provides. For example, reconfigure HealthCheck to keep logs longer than the usual last X results, store logs to other destinations, etc.

Fixes: https://issues.redhat.com/browse/RHEL-60561

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-11-19 19:44:14 +01:00
Paul Holzinger e6e9d2c21c
docs: add 5.3 as Reference version
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-19 11:31:49 +01:00
openshift-merge-bot[bot] fa5e3b6e94
Merge pull request #24535 from M1cha/network-driver-options
add support for driver-specific options during container creation
2024-11-14 09:29:44 +00:00
Michael Zimmermann 315e7412e8 add support for driver-specific options during container creation
This way has a huge disadvantage: The user will not see an error when he
uses a non-existent option. Another disadvantage is, that if we add more
options within podman, they might collide with the names chosen by
plugins. Such issues might be hard to debug.
The advantage is that the usage is very nice:
--network bridge:opt1=val1,opt2=val2.

Alternatively, we could put this behind `opt=`, which is harder to use,
but would solve all issues above:
--network bridge:opt=opt1=val1,opt=opt2=val2

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2024-11-13 18:14:58 +01:00
Maël Azimi 6809bf1d90 doc: fix words repetitions
Signed-off-by: Maël Azimi <mael.azimi@moul.re>
2024-11-13 15:21:40 +01:00
openshift-merge-bot[bot] a358d83ce9
Merge pull request #24437 from lambinoo/feat-split-pod-container-start-24401
Add key to control if a container can get started by its pod
2024-11-05 15:04:16 +00:00
Farya L. Maerten 2597eeae70 Add key to control if a container can get started by its pod
By default today, the container is always started if its pod is also
started. This prevents to create custom with systemd where containers in
a pod could be started through their `[Install]` section.

We add a key `StartWithPod=`, enabled by default, that enables one to
disable that behavior.

This prevents the pod service from changing the state of the container
service.

Fixes #24401

Signed-off-by: Farya L. Maerten <me@ltow.me>
2024-11-05 08:39:23 +01:00
openshift-merge-bot[bot] 9b8b2bf684
Merge pull request #24449 from ygalblum/quadlet-mount-image
Quadlet - support image file based mount in container file
2024-11-04 10:20:33 +00:00
openshift-merge-bot[bot] a109f22eec
Merge pull request #24431 from ntrrgc/2024-10-31-doc-interactive
doc: explain --interactive in more detail
2024-11-01 22:31:26 +00:00
Ygal Blum dbfc8cccda Quadlet - support image file based mount in container file
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-11-01 16:20:23 -04:00
Alicia Boya García 37c8e10031 doc: explain --interactive in more detail
Clarifies the behavior of --interactive in both attached and unattached
scenarios.

Adds a caveat and explanation for --interactive being hungry as
described in https://github.com/containers/podman/issues/24370.

Signed-off-by: Alicia Boya García <aboya@igalia.com>
2024-11-01 08:23:08 +01:00
openshift-merge-bot[bot] f139bc17b3
Merge pull request #24407 from Luap99/readthedocs
readthedocs: build extra formats
2024-10-30 14:50:11 +00:00
Paul Holzinger 2a0a52469c
docs: fix broken example
In coreos /mnt is a symlink to /vat/mnt and systemd does not like do use
the symlink for some reason. Simply fix the example to use /Users which
now works as we always create the directories even on /.

Fixes #24281

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-29 18:19:07 +01:00
Paul Holzinger f4be5e34c2
docs: add missing swagger links for the stable branches
It is part of the release process yet everybody ignores this. I really
should look into automating this instead.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-29 17:30:40 +01:00
Maximilian Kolb eb90154975 doc: Remove whitespace before comma
Signed-off-by: Maximilian Kolb <mail@maximilian-kolb.de>
2024-10-23 19:44:24 +02:00
Paul Holzinger 67e0fa8b89
quadlet: add default network dependencies to all units
There is no good reason for the special case, kube and pod units
definitely need it. Volume and network units maybe not but for
consistency we add it there as well. This makes the docs much easier to
write and understand for users as the behavior will not differ.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 14:01:22 +02:00
Paul Holzinger 57b022782b
quadlet: ensure user units wait for the network
As documented in the issue there is no way to wait for system units from
the user session[1]. This causes problems for rootless quadlet units as
they might be started before the network is fully up. TWhile this was
always the case and thus was never really noticed the main thing that
trigger a bunch of errors was the switch to pasta.

Pasta requires the network to be fully up in order to correctly select
the right "template" interface based on the routes. If it cannot find a
suitable interface it just fails and we cannot start the container
understandingly leading to a lot of frustration from users.

As there is no sign of any movement on the systemd issue we work around
here by using our own user unit that check if the system session
network-online.target it ready.

Now for testing it is a bit complicated. While we do now correctly test
the root and rootless generator since commit ada75c0bb8 the resulting
Wants/After= lines differ between them and there is no logic in the
testfiles themself to say if root/rootless to match specifics. One idea
was to use `assert-key-is-rootless/root` but that seemed like more
duplication for little reason so use a regex and allow both to make it
pass always. To still have some test coverage add a check in the system
test to ask systemd if we did indeed have the right depdendencies where
we can check for exact root/rootless name match.

[1] https://github.com/systemd/systemd/issues/3312

Fixes #22197

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:43:48 +02:00
openshift-merge-bot[bot] d5be88e0c2
Merge pull request #24228 from giuseppe/do-not-lower-rlimits
podman: do not set rlimits to the default value
2024-10-15 22:02:52 +00:00
Daniel J Walsh 3a4c4468f2
Mention containers.conf settings for podman machine commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-10-14 08:17:47 -04:00
Giuseppe Scrivano 5ebba75dbd
spec: always specify default rlimits
the previous implementation was expecting the rlimits to be set for the
entire process and clamping the values only when running as rootless.

Change the implementation to always specify the expected values in the
OCI spec file and do the clamping only when running as rootless and
using the default values.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-11 23:04:27 +02:00
Farya L. M bac655a6b1 Allow removing implicit quadlet systemd dependencies
Quadlet inserts network-online.target Wants/After dependencies to ensure pulling works.
Those systemd statements cannot be subsequently reset.

In the cases where those dependencies are not wanted, we add a new
configuration item called `DefaultDependencies=` in a new section called
[Quadlet]. This section is shared between different unit types.

fixes #24193

Signed-off-by: Farya L. Maerten <me@ltow.me>
2024-10-09 14:48:05 +02:00
openshift-merge-bot[bot] 95a55f971c
Merge pull request #24177 from eriksjolund/docs-prefer-option-network
docs: prefer --network to --net
2024-10-07 09:18:50 +00:00
Erik Sjölund d0cb62aacc podman-systemd.unit.5: adjust example options
Use the reserved domain name example.com in the examples.
For details, see RFC 2606
https://datatracker.ietf.org/doc/html/rfc2606#section-3

Modify PublishPort examples to make them reflect more
common scenarios.

Fixes: https://github.com/containers/podman/issues/23954

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2024-10-06 17:31:41 +02:00
Erik Sjölund 374844817d docs: prefer --network to --net
The option --network is the more official option as it is
listed in

podman run --help
podman kube play --help

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2024-10-05 09:10:15 +02:00
openshift-merge-bot[bot] 17d29a2f6d
Merge pull request #24122 from PhrozenByte/docs-hosts-file
Mention `no_hosts` and `base_hosts_file` configs in CLI option docs
2024-10-04 16:58:13 +00:00
Eric D. Helms d8b26ac1b4 Fix typo in secret inspect examples
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
2024-10-03 15:23:07 -04:00
Daniel Rudolf 6f9cc3755a
Mention `no_hosts` and `base_hosts_file` configs in CLI option docs
Follow-up to #24043

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-10-02 23:15:24 +02:00
Miloslav Trmač bb35ad1da4 Document that zstd:chunked is downgraded to zstd when encrypting
A part of https://github.com/containers/common/issues/2117 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-30 21:52:35 +02:00
openshift-merge-bot[bot] 639f3c6336
Merge pull request #24104 from Sativarsainath-26/network-cmd-removal
update docs for network-cmd-path
2024-09-30 15:50:05 +00:00
openshift-merge-bot[bot] 5cef143030
Merge pull request #24043 from PhrozenByte/docs-add-host-gateway
[CI:DOCS] Update documentation of CLI options affecting `/etc/hosts`
2024-09-30 13:37:22 +00:00
Sainath Sativar e07c31068f adding docs for network-cmd-path
Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
2024-09-30 10:41:10 +01:00
openshift-merge-bot[bot] 4e38381d37
Merge pull request #23900 from Honny1/healthcheck-log
HealthCheck log output options
2024-09-26 11:55:55 +00:00
Daniel Rudolf 6e4ef2c54d
Update documentation of `--no-hosts`, `--hostname`, and `--name` CLI options
Update the docs to properly cross-reference the `--add-host` option.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-09-25 21:42:56 +02:00
Daniel Rudolf c67d8baeb6
Update documentation of `--add-host` CLI option
Document the special *host-gateway* flag introduced with #19152, mention the special `host.containers.internal` and `host.docker.internal` hostnames, and clarify the option's usage in general.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-09-25 21:35:53 +02:00
Jan Rodák de856dab99
Add --health-max-log-count, --health-max-log-size, --health-log-destination flags
These flags can affect the output of the HealtCheck log. Currently, when a container is configured with HealthCheck, the output from the HealthCheck command is only logged to the container status file, which is accessible via `podman inspect`.
It is also limited to the last five executions and the first 500 characters per execution.

This makes debugging past problems very difficult, since the only information available about the failure of the HealthCheck command is the generic `healthcheck service failed` record.

- The `--health-log-destination` flag sets the destination of the HealthCheck log.
  - `none`: (default behavior) `HealthCheckResults` are stored in overlay containers. (For example: `$runroot/healthcheck.log`)
  - `directory`: creates a log file named `<container-ID>-healthcheck.log` with JSON `HealthCheckResults` in the specified directory.
  - `events_logger`: The log will be written with logging mechanism set by events_loggeri. It also saves the log to a default directory, for performance on a system with a large number of logs.

- The `--health-max-log-count` flag sets the maximum number of attempts in the HealthCheck log file.
  - A value of `0` indicates an infinite number of attempts in the log file.
  - The default value is `5` attempts in the log file.
- The `--health-max-log-size` flag sets the maximum length of the log stored.
  - A value of `0` indicates an infinite log length.
  - The default value is `500` log characters.

Add --health-max-log-count flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>

Add --health-max-log-size flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>

Add --health-log-destination flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-09-25 14:01:35 +02:00
openshift-merge-bot[bot] dc4bbe2b65
Merge pull request #24036 from bgilbert/unable
docs: Fix missing negation
2024-09-23 09:06:46 +00:00
openshift-merge-bot[bot] 7aedb541d5
Merge pull request #24018 from ygalblum/allow-symlinks
Quadlet - add full support for Symlinks
2024-09-23 06:49:12 +00:00
Benjamin Gilbert 62e5eb4734 docs: Fix missing negation
Fixes: 32c2cea0f9 ("Remove future tense from man pages")
Signed-off-by: Benjamin Gilbert <bgilbert@backtick.net>
2024-09-22 22:19:38 -07:00
Ygal Blum 133ea31ffb Quadlet - add full support for Symlinks
Use os.ReadDir recursively instead of filepath.WalkDir
Use map instead of list to easily find looped Symlinks
Update existing tests and add a more elaborate one
Update the man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-09-20 11:11:03 -04:00
Misaki Kasumi 7dccf8faee docs: remove usage of deprecated `--storage`
in the doc of podman-build

Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-09-20 12:17:41 +08:00
Nalin Dahyabhai 00c13afcb9 podman-manifest-remove: update docs and help output
* podman manifest remove doesn't accept references as descriptions of
  what to remove from a list or index; only use digests in the man page
* podman manifest remove only removes one thing at a time; correct the
  man page examples

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-09-17 11:36:12 -04:00
openshift-merge-bot[bot] 3f0483f880
Merge pull request #23802 from jerome59/main
Podman CLI --add-host with multiple host for a single IP
2024-09-17 12:54:46 +00:00
Jerome Degroote f4d0e124d6 Podman CLI --add-host with multiple host for a single IP
Signed-off-by: Jerome degroote <jeromedu59230@gmx.fr>
2024-09-17 09:35:38 +02:00
Eike Waldt fdb2edf46a
Fxi typo in cache-ttl.md
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
2024-09-16 14:58:38 +02:00
Eric Curtin 01a1761fd9 Minor typo noticed when reading podman man page
It reads "ashort-name" when it should read "a short-name" when viewing
via man. It's missing a space. Also removed some duplicate spaces.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-09-13 13:04:57 +01:00
openshift-merge-bot[bot] 7764bea981
Merge pull request #23819 from l0rd/kube-play-image-type-volumes
Add `kube play` support for volumes of type image
2024-09-11 18:32:24 +00:00
Mario Loriedo db12343e27 Add kube play support for image volume source
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-09-10 12:37:06 +00:00
Paul Holzinger 0abbcfa50a
podman images: sort repository with tags
When you sort by repository a user most likely also want the tags to be
sorted as well. At the very least to get a stable output as the order
could be changed pull podman tag/pull even if they keep using the same
tag name.

Fixes #23803

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-06 14:17:17 +02:00
openshift-merge-bot[bot] dde031076b
Merge pull request #23722 from umohnani8/jobs
Add support for Job to kube generate & play
2024-09-06 09:02:55 +00:00
openshift-merge-bot[bot] b645f708f8
Merge pull request #23875 from rhatdan/rootless
Add podman-rootless.7 man page
2024-09-06 08:51:55 +00:00
openshift-merge-bot[bot] ae14dff812
Merge pull request #23398 from yarikoptic/enh-codespell
Add codespell support (config, workflow to detect/not fix) and make it fix few typos
2024-09-05 18:53:25 +00:00
openshift-merge-bot[bot] 094fed7dbe
Merge pull request #23846 from flouthoc/prune-cleancachemount
prune: add `--build-cache` to support clearing build cache using `CleanCacheMount`
2024-09-05 18:47:56 +00:00
Yaroslav Halchenko c203c48c70 Detect and fix typos using codespell
Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
2024-09-05 13:56:39 -04:00
flouthoc 901f621daa
prune: support clearing build cache using CleanCacheMount
`podman builder prune` and `podman image prune` should also support
cleaning build cache using buildah's public `CleanCacheMount` API.

Reference: https://docs.docker.com/reference/cli/docker/builder/prune/
Context: https://github.com/containers/podman/discussions/15612#discussioncomment-10532721
Context: https://github.com/containers/buildah/pull/4490

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2024-09-05 10:40:07 -07:00
Urvashi Mohnani bdf96e7df2 Add support for Job to kube generate & play
The kube generate command can now generate a yaml for
the Job kind and the kube play command can create a pod
and containers with podman when passed in a Job yaml.
Add relevant tests and docs for this.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-09-05 11:36:38 -04:00
Daniel J Walsh c317da8deb
Add podman-rootless.7 man page
This is a follow up to 5389eee737
to add rooltess.md information to man pages to help users
discover solutions to troubleshooting and rooless issues.

Specicifally I was surprised when binding to ports < 1024 was
not covered in podman-troubleshooting.7 man page.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-09-05 09:56:48 -04:00
openshift-merge-bot[bot] 8578fddf0f
Merge pull request #23868 from toadstule/quadlet-pod-dns
Add DNS, DNSOption and DNSSearch to quadlet pod
2024-09-05 10:07:15 +00:00
Steve Jibson 15bde1abdb Add DNS, DNSOption and DNSSearch to quadlet pod
Signed-off-by: Steve Jibson <steve@jibson.com>
2024-09-04 11:31:32 -06:00
Ben Darwin 0f77363ff5 podman.1.md: improve policy.json section
Mentions allowed policy.json location in $HOME, and links to further documentation.

Fixes: #23849

Signed-off-by: Ben Darwin <bcdarwin@gmail.com>
2024-09-04 12:30:57 -04:00
openshift-merge-bot[bot] 57efe1daf0
Merge pull request #23841 from jakecorrenti/defaultmachine
Add disclaimer in `podman machine info` manpage
2024-09-04 11:48:24 +00:00
Jake Correnti 8eb7eff899 Add disclaimer to `podman machine info` manpage.
Adds a note in the `podman machine info` manpage that clarifies
that `defaultmachine` in the `podman machine info` output does
not suggest that a user can set a default podman machine via
system connections.

Additionally adds a Podman 6.0 TODO comment to change the name of the
field to `ActiveMachineConnection` to better describe its purpose.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2024-09-03 15:23:18 -04:00
Ed Santiago d803bb3407 man pages: refactor two more options
We're supposed to catch duplicate man-page options in review,
but once in a while they sneak in. These are two dups that
are 100% identical, and were auto-refactored by a script
that I have. A few more options have snuck in (--dns, --usb)
but those have different text so they can't be handled by
my script. If anyone feels like refactoring those, go ahead.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-09-03 11:13:46 -06:00
openshift-merge-bot[bot] 29eb8ce09e
Merge pull request #23814 from ruihe774/quadlet-network-container
quadlet: support container network reusing
2024-09-02 16:23:01 +00:00
openshift-merge-bot[bot] b98612227c
Merge pull request #23813 from Luap99/readthedocs
docs: update read the docs changes
2024-09-02 09:36:00 +00:00
openshift-merge-bot[bot] ef905ef8d0
Merge pull request #23726 from ashley-cui/machlist
machine: Add -all-providers flag to machine list
2024-08-30 16:52:31 +00:00
Misaki Kasumi 71fd15726d quadlet: support container network reusing
Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-08-30 21:35:21 +08:00
Paul Holzinger f40eb5f06a
docs: update read the docs changes
Read the Docs does some update by October 7, 2024 which will effect our
builds per[1]. As such apply the recommended changes from there to our
conf.py file so we do not get broken builds after that date hopefully.

[1] https://about.readthedocs.com/blog/2024/07/addons-by-default/#how-does-it-affect-my-projects

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-30 11:57:58 +02:00
Ygal Blum 2b14db2af3 Quadlet - Support multiple image tags in .build files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-08-29 15:07:49 -04:00
openshift-merge-bot[bot] 2b3052eac3
Merge pull request #23758 from edsantiago/podman-troubleshooting
Create a podman-troubleshooting man page
2024-08-29 16:54:00 +00:00
Will Refvem 63545126c2
Clarify podman machine volume mounting behavior under WSL
Signed-off-by: Will Refvem <wbrefvem@gmail.com>
2024-08-28 13:57:03 -04:00
Ashley Cui 41f945fc24 machine: Add -all-providers flag to machine list
Podman machine list now supports a new option, --all-providers, which lists all machines from all providers.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-08-28 13:40:50 -04:00
Ed Santiago 5389eee737 Create a podman-troubleshooting man page
Generated at build time from troubleshooting.md. Purpose is
to ship an actual man page to end users.

Much more complicated than initial guess, because there was
a bug in my Makefile man page filtering, the sed expression
that cleans up markdown that does not translate to roff.
All I've done here is reorder some of the expressions,
stripping off https links *before* we process
podman man page links.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-28 05:49:45 -06:00
openshift-merge-bot[bot] 39f9d4ecae
Merge pull request #23667 from rhatdan/man
[ci:docs] Fix description of :Z to talk about pods
2024-08-27 09:43:43 +00:00
openshift-merge-bot[bot] 9892feedd9
Merge pull request #23713 from jerome59/main
Quadlet add support for --add-host --ip and --ip6
2024-08-27 09:21:45 +00:00
Jerome Degroote 7c5d8bec0d Add support for AddHost in quadlet .pod and .container
Signed-off-by: Jerome degroote <jeromedu59230@gmx.fr>
2024-08-26 14:32:08 +02:00
Qori El-Hafizh 16007e4370
fix typo in podman-network-create.1.md
gateway ip in the description doesnt match the provided command

Signed-off-by: Qori El-Hafizh <57665201+qrhfz@users.noreply.github.com>
2024-08-25 12:05:33 +00:00
Jerome Degroote d55b12f70b Add support for IP in quadlet .pod files
Signed-off-by: Jerome degroote <jeromedu59230@gmx.fr>
2024-08-22 14:51:12 +02:00
openshift-merge-bot[bot] e7905122d7
Merge pull request #23679 from ruihe774/pod-userns
quadlet: support user mapping in pod unit
2024-08-22 12:33:43 +00:00
Misaki Kasumi 4fbfa7de6e quadlet: support user mapping in pod unit
Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-08-22 09:41:06 +08:00
Daniel J Walsh 1d5bdce3d9
Merge branch 'main' of github.com:containers/podman into man
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-08-21 08:59:06 -04:00
Daniel J Walsh 29071ac498
command is not optional to podman exec
Fixes: https://github.com/containers/podman/issues/22849

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-08-21 08:45:50 -04:00
Misaki Kasumi 1ccccde183 quadlet: add key CgroupsMode
Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-08-20 22:09:36 +08:00
Daniel J Walsh d5cd388729
Fix description of :Z to talk about pods
Fixes: 23329

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-08-19 09:57:25 -04:00
Paul Holzinger 80639df27a
podman wait: allow waiting for removal of containers
By default wait only waits for the exit of a container, there is really
no way to make it wait for the removal too when the container was
created with --rm. I though I found a clever way in 8a943311db but this
is not working race free. While it works most of the time any other
parallel process might call syncContainer() before the cleanup process
holds the lock until it removes it. As such the wait hack to only update
the state and not sync the exit file did not work so we can drop that.

However the test wants to wait for the removal to happen by the cleanup
process and we can already say --condition=removing to do this but this
will throw an error if the ctr was removed instead of counting this as
success so fix that as well.

Fixes #23640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-16 15:44:02 +02:00
Paul Holzinger 6fb10421fb
docs: update podman-wait man page
Waiting now actually makes sure to exit on first container exit. Also
notice that it does not wait for --rm to have the container removed at
this point.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-15 13:32:41 +02:00
Colin Walters d26341332c docs/podman-systemd: Try to clarify `Exec=` more
In podman-systemd we are intersecting the worlds of containers
and systemd, and I had to stop and think to understand what
`Exec=` does.

I tried to clarify things more here.

I found it especially confusing because the example at the
very top of the file does:

```
Image=quay.io/fedora/fedora
Exec=sleep 10
```

But that only makes sense because the fedora base image
(being generic) doesn't define an `ENTRYPOINT`, just a `CMD`.

But IMO by far the most common usage for podman-systemd
is "app images" which conventionally should use `ENTRYPOINT`
in general. Maybe we should change the default example,
but I'm leaving that for a later followup.

(It perhaps would have been less confusing if this field
 had been called `Args=` to make clear it's quite different
 in practice from systemd `ExecStart=`)

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-12 09:03:57 -04:00
tomsweeneyredhat b8a9b184af Add --compat-volumes option to build and farm build
Add the `--compat-volumes option from Buildah v1.37 into
Podman in preparation of Podman v5.2

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-30 18:26:13 -04:00
Ygal Blum f3a86266e6 Quadlet - Allow the user to set the service name for .pod files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-07-29 16:11:19 +03:00
Daniel J Walsh ce7dded38b
Add /run/containers/systemd, ${XDG_RUNTIME_DIR}/containers/systemd quadlet dirs
Fixes: https://github.com/containers/podman/issues/23363

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-07-24 09:28:00 -04:00
Daniel J Walsh 7768cf235e
Run codespell on source
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-07-23 07:28:23 -04:00
Daniel J Walsh 0ecd6fa59f
Add support for StopSignal in quadlet .container files
Fixes: https://github.com/containers/podman/issues/23050

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-07-22 06:43:45 -04:00
benniekiss 3c52ef43f5 Expand drop-in search paths
* top-level (pod.d)
* truncated (unit-.container.d)

Signed-off-by: Bennie Milburn-Town <63211101+benniekiss@users.noreply.github.com>
2024-07-17 17:43:02 -04:00
openshift-merge-bot[bot] e225cae781
Merge pull request #23145 from afbjorklund/remove-machine-volume-driver
Remove the unused machine volume-driver
2024-07-15 20:36:19 +00:00
Félix Saparelli 54fce37968
Add NetworkAlias= support to quadlet
Adds a `NetworkAlias=` key to both .container and .pod quadlet files,
which translates to the `--network-alias` option to `podman run` and
`podman pod create` respectively. Can be repeated multiple times.

Signed-off-by: Félix Saparelli <felix@passcod.name>
2024-07-15 16:39:25 +12:00
openshift-merge-bot[bot] e62c928642
Merge pull request #23074 from marinmo/podman-compose-providerfix
Make podman-compose refer to podman-compose(1) when using an external provider
2024-07-12 13:48:33 +00:00
marinmo 02af4f8bd6 Update warning message when using external compose provider
Change the warning message at runtime to refer to the man page of podman-compose instead of "the documentation"

Add instructions in the man page on how to disable the warning emitted by podman-compose when using an external compose provider

Signed-off-by: marinmo <bugzilla@marinmo.org>
2024-07-12 07:12:32 +02:00
Ed Santiago d4c0e7ecbd CI: test composefs on rawhide
Run root e2e & system tests using composefs on rawhide.

Write magic settings to storage.conf. That part is easy.

e2e tests, however, ignore storage.conf. They require everything
to be specified on the command line. And "everything", in the
case of composefs, includes a long complicated --pull-options
string which in turn requires containers-storage PR 1966
which, as of this writing, is finally vendored into podman.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-10 14:51:58 -06:00
Wanqi Li bd71b75de4 Improve container filenname ambiguity.
Fixes: #23039

Signed-off-by: Wanqi Li <wanli@umass.edu>
2024-07-09 13:24:51 -04:00
Paul Holzinger 9814ed40c7
docs: --network remove missing leading sentence
This senetence does not add any value and instead confuses users as it
suggest that the name is somhow special and related to bridge networks
which is not the case. Using either the name or id is fine as described
in the sentence before.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 11:46:34 +02:00