248 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
fdb2edf46a Fxi typo in cache-ttl.md
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
2024-09-16 14:58:38 +02:00
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
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
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
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
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
64091777fe Remove references to --pull=true and --pull=false
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-12 18:16:29 +02:00
9a8c3433c1 [CI:DOCS] Update podman network docs
Update the podman network docs to specify that the default rootless
networking tool has been swapped from slirp4netns to pasta.

Signed-off-by: Pranav RK <pranavrk7@gmail.com>
2024-05-17 19:05:31 +05:30
3c1c6a44ef Correct option name ip -> ip6
Also, properly capitalize.

Signed-off-by: Sander Maijers <3374183+sanmai-NL@users.noreply.github.com>
2024-04-25 22:17:06 +02:00
693ae0ebc6 Add support for image volume subpaths
Image volumes (the `--mount type=image,...` kind, not the
`podman volume create --driver image ...` kind - it's strange
that we have two) are needed for our automount scheme, but the
request is that we mount only specific subpaths from the image
into the container. To do that, we need image volume subpath
support. Not that difficult code-wise, mostly just plumbing.

Also, add support to the CLI; not strictly necessary, but it
doesn't hurt anything and will make testing easier.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 14:12:27 -04:00
482ef7bfcf Add support for updating restart policy
This is something Docker does, and we did not do until now. Most
difficult/annoying part was the REST API, where I did not really
want to modify the struct being sent, so I made the new restart
policy parameters query parameters instead.

Testing was also a bit annoying, because testing restart policy
always is.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:51 -04:00
d4ecae59bd [CI:DOCS] options/network: fix markdown lists
Markdown needs lists to be separate paragraphs, otherwise all the items
end up in a single line.

I also made arguments to be replaced italic to clarify that they
shouldn't be typed exactly as shown.

Signed-off-by: Baltazár Radics <baltazar.radics@gmail.com>
2024-04-16 10:59:30 +02:00
8de92ec912 docs: fix missleading run/create --expose description
The --expose option doesn't actually affect port forwarding or anything
like that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 14:24:32 +02:00
2bbed8f200 Add man page content for artifacts
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 11:47:44 -05:00
66d60384f4 add --retry --retry-delay to podman run/create
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
c3c0c4ab96 Add support for podman push --retry --retry-delay
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
950f612b56 logging: new mode -l passthrough-tty
it works in a similar way to passthrough but it allows to be used also
on a TTY.

conmon support: https://github.com/containers/conmon/pull/465

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-28 17:23:59 +01:00
7ba23cd6fc Allow podman pull to specify --retry and --retry-delay
Fixes: https://github.com/containers/podman/issues/19770

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-17 07:37:26 -05:00
a2c086c789 [CI:DOCS] fix userns.pod.md mapping table
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-09 15:53:34 +05:30
3495aae42b docs: resole hierarchical issues with userns parameters
Signed-off-by: paomian <xpaomian@gmail.com>
2024-02-09 14:45:05 +08:00
88b994902d Merge pull request #21512 from Luap99/pasta-netname-removal
drop support for "pasta" as a network name
2024-02-08 17:17:55 +00:00
77847bd67a docs: make --seccomp=profile.json clearer
There are not only allowed syscalls, also blocked ones or handled
differently.

[CI:DOCS]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-07 13:16:35 +01:00
249474a84e drop support for "pasta" as a network name
The pasta network mode has been added in podman v4.4 and this causes a
conflict with named networks that could also be called "pasta". To not
break anything we had special logic to prefer the named network over the
network mode. Now with 5.0 we can break this and remove this awkward
special handling from the code.

Containers created with 4.X that use a named network pasta will also
continue to work fine, this chnage will only effect the creation of new
containers with a named network pasta and instead always used the
network mode pasta. We now also block the creation of networks with the
name "pasta".

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-05 13:57:24 +01:00
2818abf849 Update to runc main, removing pin to an older version
We were pinned to a specific commit to ensure that tests kept
passing. Hopefully they pass now, as we need to grab latest runc
for CVE fixes.

Also grab Buildah main to fix a build issue on FreeBSD. After a
botched manual vendor, I used Ed's treadmill script and squashed
it into this commit to make Git happy. Thanks bunches Ed.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-02 08:11:17 -05:00
c41c30bedd Merge pull request #21180 from rhatdan/nvidia
Make --gpus work with nvidia gpus
2024-01-30 14:59:02 +00:00
3a46fe858f Merge pull request #21069 from umohnani8/new-farmbuild-2
farm build: push built images to registry
2024-01-15 18:41:29 +00:00
d95710a89c farm build: push built images to registry
Update farm build to directly push images to a registry
after all the builds are complete on all the nodes.
A manifest list is then created locally and pushed to
the registry as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-01-15 11:31:17 -05:00
46cfc9858f Make --gpus work with nvidia gpus
Somewhat documented here:
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html
https://stackoverflow.com/questions/25185405/using-gpu-from-a-docker-container

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

Don't have access to nvidia GPUS, relying on contributor testing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-11 21:13:25 -05:00
560455cbd6 docs: fix typos
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-04 12:10:11 +02:00
e4ecd7cca3 doc cleanup
Began as a review of #20983, a community PR from @krumelmonster
for moving divisive-language footnotes closer to the point
where they're used. In the process, I noticed a lot of poor
markdown, mostly bad use of whitespace. Cleaned it up, added
some italic/bold/tty markdown to options, and cleaned up
some language I found confusing.

Thanks to @krumelmonster for initial PR.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-14 05:17:43 -07:00
611ba2ff31 Merge pull request #20827 from kaivol/userns-auto-intermediate-id-lookup
Support lookup of intermediate ID for uidmapping and gidmapping in `--userns=auto`
2023-12-11 10:19:14 +00:00
67aae8e62e Merge pull request #20866 from giuseppe/add-preserve-fds-list
podman: new option --preserve-fd
2023-12-06 13:34:34 +00:00
01d397a658 podman: new option --preserve-fd
add a new option --preserve-fd that allows to specify a list of FDs to
pass down to the container.

It is similar to --preserve-fds but it allows to specify a list of FDs
instead of the maximum FD number to preserve.

--preserve-fd and --preserve-fds are mutually exclusive.

It requires crun since runc would complain if any fd below
--preserve-fds is not preserved.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-12-05 10:16:41 +01:00
b1eccedf5e [CI:DOCS] Update health-start-periods docs
Update the health-start-period docs to clarify what exactly
the health-start-period flag does based on whether the health
check command succeeds or fails.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-12-04 05:29:53 -05:00
bc124dd13f Merge pull request #20819 from cgiradkar/20752_farm_flag_move
Move the --farm flag to farm build command
2023-12-01 21:12:38 +00:00
31df9c237e Move the --farm flag to farm build command
The option `farm` which is used to specify the farm to be used, is moved to farm build command from farm command.

closes #20752

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-11-30 14:27:06 +00:00