Commit Graph

4429 Commits

Author SHA1 Message Date
Paul Holzinger
e74582fcd5 remove CONTAINERS_REGISTRIES_CONF parsing code
The recent registries.conf rework made so the backend already reads the
env var. As such clients should no longer set it directly to simplify
the code here.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-23 16:22:07 +02:00
Brent Baude
2cc3be7332 RUN-4539: Change podman module paths
The podman module paths are moving from github.com/containers/podman to
go.podman.io/podman.  This will help with future mobility.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-04-22 14:02:25 -05:00
Matt Heon
3279767614 Merge pull request #28336 from l0rd/import_native_ca
Import host trusted certificates into the guest machine - Windows part
2026-04-22 13:04:55 -04:00
Brent Baude
2e6f29a2df RUN-4538: Fix buildah vendoring
This PR reflects the upstream change of moving the buildah module from
github.com/containers/buildah to go.podman.io/buildah.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-04-21 14:27:58 -05:00
Jan Kaluza
54d61c2f02 trust: switch policy.json lookup to configfile
Use shared configfile instead of custom policy.json path handling.
This updates ocipull to rely on signature.DefaultPolicy(), removes
explicit SignaturePolicyPath, and replaces trust's custom default-policy
path logic with common configfile code.

Replace hidden `--policypath` with --signature-policy` and require
it for `trust set` command instead of path resolution based on
configfile.

For `trust get`, the `--signature-policy` is optional.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2026-04-20 15:11:22 +02:00
Paul Holzinger
34a4633d5f Merge pull request #28275 from mheon/ordered_networks
Move to deterministic network setup order
2026-04-20 12:33:13 +02:00
Matthew Heon
efba9996f6 Implement --save-stages/--stage-labels for build
These are two new Buildah flags that we need to wire into Podman
(both local and remote) and document, with the interesting note
that one requires the other and a check needed to be added for
that.

Also: secret parsing was tightened up in Buildah, and was
breaking the remote build tests. Rewire it to use the new parser
Buildah made, which ends up simplifying the code considerably.
Tests are back to passing afterwards.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2026-04-17 10:00:32 -04:00
Matthew Heon
5e94c95ad0 Move to deterministic network setup order
This was implemented by containers/netavark #1369; this commit
completes the process by wiring it into Podman. We now respect
the CLI order for configured networks - if a user passes
`--net net1,net2` we guarantee that net1 will be configured
before net2.

For containers created before this patch, we don't retain enough
information to configure networks in CLI order, so we use
alphabetical order instead to still guarantee consistency.

No breaking API changes have been made, but we do add a new
field to supplement the existing map to (optionally) provide
ordering information. The Podman CLI will always pass this.
Existing applications that do not will, again, receive]
deterministic ordering based on an alphabetical sort of network
names.

This requires the latest version of Netavark to work properly.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2026-04-17 10:00:32 -04:00
Nicola Sella
d92cc360f1 Add Pod to quadlet list
Fixes: https://redhat.atlassian.net/browse/RUN-3835

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-04-17 13:42:16 +02:00
Lokesh Mandvekar
9ff3f4cb1e Clean up outdated slirp4netns references in comments
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-04-13 09:05:09 -04:00
Lokesh Mandvekar
42a98a5a82 Remove slirp4netns from CLI and completions
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-04-13 09:04:41 -04:00
Tom Sweeney
ef7fdbabc4 Merge pull request #28464 from simonbrauner/volume-prune-fix-all-filter
Fix inconsistencies between --all and --filter=all in volume prune
2026-04-10 17:03:31 -04:00
Mario Loriedo
e3b5d0f1ad Merge pull request #27932 from lstocchi/i27627
Propose running init/rm command on hyperv machine in elevated mode when required
2026-04-10 18:21:20 +02:00
Šimon Brauner
4f252be4a0 Fix inconsistencies between --all and --filter=all in volume prune
Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-04-08 14:52:41 +02:00
Paul Holzinger
23f0386587 Revert "fix(artifact): show :latest tag in ls output when no explicit tag given"
This reverts commit 3bd376401e.

As discussed on #28401 we should revert these changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-07 20:57:06 +02:00
lstocchi
a9a9eda883 rename ErrRelaunchAttempt to ErrRelaunchSucceeded and fix elevated error handling
The old ErrRelaunchAttempt name was ambiguous — it reads as though the
relaunch attempt failed, when it actually signals success. Rename to
ErrRelaunchSucceeded and update comments at every call site to clarify
that this is not a real error but a sentinel indicating the elevated
child process completed the operation successfully.

Also fix a bug in WSL's launchElevate where a failed elevated process
was incorrectly wrapped with the sentinel, causing callers to treat the
failure as success and print "Machine init complete."

Signed-off-by: lstocchi <lstocchi@redhat.com>
2026-04-03 18:37:24 +02:00
lstocchi
8e5fde01c6 propose running init/rm command on hyperv machine in elevated mode
This commit adds automatic UAC elevation prompts for HyperV machine
init/rm actions when administrator privileges are required.
Previously, users had to manually run Podman as administrator
when creating the first machine or removing the last machine, which
requires Windows Registry modifications.

When the HyperV command gets relaunched as elevated, the error of the
elevated process is saved on a file to be displayed by the caller. The
implementation is the same as that used by WSL.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2026-04-03 18:37:08 +02:00
Paul Holzinger
d20933df02 add missing O_CLOEXEC to open calls
The go std os package to will always make sure to use O_CLOEXEC, however
in cases where we directly call unix.Open() we need to pass that flag
explicitly.

I looked at this as there was a report of a leaked fd on the pasta list,
though I am not sure this will address it.

But anyway doing this should be rather safe and avoid leaks into other
processes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-02 15:06:37 +02:00
Mario Loriedo
24ee5aec48 Add new flag --import-native-ca for machine init/set
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-04-01 14:12:30 +02:00
Mario Loriedo
4bba8c267a Extract function LocalhostSSHCopy to make it visible from other packages too
This will be useful when importing host certificates and the certificates file
isn't mounted in the guest.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-04-01 14:12:30 +02:00
Matt Heon
9bea6e759a Merge pull request #28382 from himgov/issue/28369
Add a Status filter to podman quadlet list #28369
2026-03-30 13:25:04 -04:00
Devesh B
3bd376401e fix(artifact): show :latest tag in ls output when no explicit tag given
When an artifact is added without an explicit tag (e.g.
"quay.io/myimage/myartifact"), the TAG column in "podman artifact ls"
was empty instead of showing "latest", unlike container images which
default to :latest.

Add a call to reference.TagNameOnly() after parsing the stored name so
the display normalises the reference before extracting the tag, matching
the behaviour of container images.

Fixes: #27083

Signed-off-by: Devesh B <98201065+DeveshB-1@users.noreply.github.com>
2026-03-29 23:42:31 +05:30
Himanshu Jaiswal
04935fe867 Add a Status filter to podman quadlet list
Adds --filter status=<value> support to podman quadlet list.
Also adds shell completion for the status filter values.

Signed-off-by: Himanshu Jaiswal <himanshu.bw5@gmail.com>
2026-03-28 12:05:46 +00:00
Tom Sweeney
8c3af49bef Merge pull request #28347 from Honny1/machine-cpu-limits
Reject `--cpus` above host CPU count on podman machine init and set
2026-03-25 11:05:37 -04:00
Jan Rodák
c722f2f6e7 Validate memory on every init, not only with --memory
The default memory value is sourced from `containers.conf`,
it could be misconfigured.

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-23 18:22:14 +01:00
Jan Rodák
bb4dda4855 Reject --cpus above host CPU count on podman machine init and set
Fixes: https://github.com/containers/podman/issues/28322

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-23 18:22:14 +01:00
Brent Baude
48d36932e2 Error on WSL machine os apply|upgrade
Given that apply and upgrade do not work on WSL, we should error out
with an error as such.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-03-23 10:01:53 -05:00
Paul Holzinger
78c28fc254 vendor: update container-libs to pick up storage.conf rework
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-03-19 21:48:48 +01:00
Paul Holzinger
0147339e8e Merge pull request #28202 from lsm5/podman6-no-cni-vendor
Podman6: Vendor update w/o CNI + additional cleanups
2026-03-19 21:44:01 +01:00
Paul Holzinger
46502be750 Merge pull request #28234 from Honny1/add-format-for-scp
Add `--format` to `podman image scp`
2026-03-19 19:50:16 +01:00
Paul Holzinger
d2e7e8192e Merge pull request #28235 from Honny1/volume-prune-docker
`podman volume prune`: match Docker defaults, add `--all` flag
2026-03-19 17:53:18 +01:00
Jan Rodák
da3c4aa21a Add --format to image scp
Add --format (oci-archive, docker-archive) to pass through to podman save.
Default is unchanged (no --format) so podman save uses its own default.
Document that scp is not storage-to-storage and only archive formats
are supported.

Fixes: https://github.com/containers/podman/issues/28183
Fixes: https://issues.redhat.com/browse/RUN-4403

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-19 17:42:33 +01:00
Lokesh Mandvekar
8d1f636e40 vendor update without CNI in buildah and container-libs
rootlessport: clarify RootlessCNI comment

Update the comment for the RootlessCNI conditional to clarify that
the flag is for rootless bridge networking, not CNI specifically.
The bool is set when netStatus != nil in slirp4netns and will be
removed when slirp4netns and rootlessport are fully dropped.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-03-19 20:26:21 +05:30
Tom Sweeney
bb9d188d4a Merge pull request #28236 from Honny1/fix-unless-stopped
Fix `unless-stopped` containers not restarting after `podman-restart-service` stop them
2026-03-19 10:45:28 -04:00
Jan Rodák
339acf880c volume prune: match Docker default and add --all
Fixes: https://github.com/containers/podman/issues/24597
Fixes: https://issues.redhat.com/browse/RUN-4404

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-19 13:40:45 +01:00
Jan Rodák
7326b862e3 Fix unless-stopped containers not restarting after podman-restart.service stop them
When `podman-restart.service` stops containers, it marks them as "stopped by
user" which breaks the `unless-stopped` restart policy. Add hidden
`--not-stopped-by-user` flag to prevent this, allowing `unless-stopped`
containers to restart on next boot.

Fixes: https://github.com/containers/podman/issues/28152
Fixes: https://issues.redhat.com/browse/RUN-4357

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-16 13:51:17 +01:00
Jan Rodák
e3754862d1 Merge pull request #28265 from kyounghunJang/main
feat: print client info from `podman version` when the server is not available
2026-03-16 11:35:16 +01:00
KyounghoonJang
c7921b0049 feat: print client info from podman version when the server is unavailable
In remote mode, `podman version` currently returns a connection error before
printing any version information if it cannot connect to the service.

Introduce a reusable `PrintVersion` helper and invoke it at the root level
when a `ConnectionError` is encountered. This ensures that client information
is still shown even when the server cannot be reached.

Fixes: #28222
Signed-off-by: KyounghoonJang <matkimchi_@naver.com>
2026-03-13 19:09:54 +09:00
Paul Holzinger
14dd313d41 Merge pull request #27766 from Banana-Cultist/podman-events-oom
Improve OOMKilled Visibility
2026-03-12 19:23:02 +01:00
Paul Holzinger
1f3c344312 run modernize -fix ./...
modernize seems to be smarter now so it found some more things that are
not even go 1.25 related.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-03-12 17:22:01 +01:00
Bruce Fan
ffeb0d103b Improve OOMKilled visibility in podman events and in podman inspect docs
Signed-off-by: Bruce Fan <brucexfan@gmail.com>
2026-03-11 10:15:56 -05:00
Lokesh Mandvekar
5685ac5952 Merge pull request #28196 from MayorFaj/bug/28178-fix-cli-help-example-indentation
fix CLI help example indentation
2026-03-09 15:20:06 +05:30
MayorFaj
31b956e0f1 Fix CLI help example indentation for multi-line examples
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-03-06 21:06:04 +00:00
Paul Holzinger
5adac65c0a Merge pull request #28208 from mtrmac/tls-behavior-basics
Add --tls-details for (pull, push, run, login, logout)
2026-03-06 16:33:38 +01:00
Povilas Kanapickas
636eb1a401 libpod: Implement --log-opt label=LABEL=Value
This allows things like compose project names to be associated with log
messages and later used in log processing and analysis.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2026-03-06 10:59:31 +02:00
Miloslav Trmač
7fd3be8288 Add --tls-details support for (podman login) and (podman logout)
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2026-03-06 00:33:14 +01:00
Miloslav Trmač
13e1d5af4b PARTIALLY TESTED: Add --tls-details, use it to affect libimage and the like
For remote operation, start the remote service with --tls-details:
using --tls-details on the client side will only affect client's
connection.

This should eventually include many more tests - track down all current
uses of libpod.Runtime.{SystemContext,imageContext,LibimageRuntime}.
That will come later

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2026-03-05 23:13:17 +01:00
Paul Holzinger
56ce3368be vendor: update container-libs to latest
This needs one fix for the API interface for download.FromURL() which was
changed.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-03-05 13:00:33 +01:00
Matt Heon
aefdaf317d Merge pull request #28170 from StaticRocket/bugfix/quadlet-list
fix(cmd/podman/quadlet): Behave like container ls
2026-03-03 13:03:07 -05:00
Randolph Sapp
33a36bd56b fix(cmd/podman/quadlet): Behave like container ls
Quadlet list always reports the heading, even when using custom
formatting strings. This doesn't follow the behavior of other podman
list commands. Borrow some logic and the "--noheading" flag from the
container list command to make this behavior uniform.

Signed-off-by: Randolph Sapp <rs@ti.com>
2026-03-03 10:04:37 -06:00