Commit Graph

1581 Commits

Author SHA1 Message Date
EDuToit
e58ec4dc07 Address seccomp profile todo:
- resolve seccomp profile from config default
- assign profile if default path is not defined

Signed-off-by: EDuToit <eben.dutoit07@gmail.com>
2026-03-26 12:00:59 +01:00
Jan Rodák
7952067882 Merge pull request #28352 from crawfordxx/fix-system-check-missing-return-on-parse-error
api: fix missing return after error in SystemCheck handler
2026-03-25 15:15:29 +01:00
Jan Rodák
5260bd37b6 Merge pull request #28224 from simonbrauner/libpod-pull-progress
Extend libpod pull API to show pull progress
2026-03-24 10:43:32 +01:00
crawfordxx
29d80a26af api: fix missing return after error in SystemCheck handler
In the SystemCheck HTTP handler, when parsing the
unreferenced_layer_max_age query parameter fails, the error response is
sent but execution continues to `unreferencedLayerMaximumAge = &duration`
where `duration` is the zero value. This causes the system check to run
with a zero duration instead of returning the 400 error to the client.

Add the missing `return` after the error response.

Fixes #28350

Signed-off-by: crawfordxx <crawfordxx@users.noreply.github.com>
2026-03-24 12:12:19 +08:00
Jan Rodák
d887a8146a Fix creating unnamed volumes as anonymous
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-19 13:40:47 +01: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
Šimon Brauner
6f497d2437 Extend libpod pull API to show pull progress
Fixes: https://issues.redhat.com/browse/RUN-4362

Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-03-18 13:44:41 +01:00
Jan Rodák
acf6472f5b Ignore operational EndpointSettings.IPAddress for static IPs in compat API
Docker treats EndpointSettings.IPAddress as operational/state, not desired create input.
Static address requests should come from IPAMConfig fields. Using both can duplicate
the same IPv4 request and trigger already allocated IPAM errors in compose scenarios.

Ref: moby/moby#46183 (daemon validation), docker/cli#4493 (CLI IPAMConfig), moby/moby#19001 (static IP feature).

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-16 13:48:41 +01:00
Jordan Rodgers
7ecac4a65e compat: return 409 Conflict when container name is already in use
The Docker API spec defines HTTP 409 for POST /containers/create when
the requested name is already in use. The handler was returning 500 for
all errors from ContainerCreate, including ErrCtrExists.

This mismatch breaks buildx parallel builds on Podman: buildx checks
for a conflict response to safely converge multiple concurrent builders
onto the already-running BuildKit container. With 500 it treats the
conflict as a fatal error instead, causing all but the first parallel
build to fail.

The fix follows the same pattern already used in the rename handler,
which correctly returns 409 for ErrCtrExists. The swagger annotation
for this endpoint already documents the 409 response.

Signed-off-by: Jordan Rodgers <com6056@gmail.com>
2026-03-13 09:53:04 -07: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
Tim Zhou
a414460351 chore(api): add swagger docs for undocumented API parameters
Add documentation for undocumented API parameters across multiple endpoints:

System:
- POST /libpod/system/prune: all, volumes, external, build, filters

Pods:
- DELETE /libpod/pods/{name}: timeout
- GET /libpod/pods/stats: stream, delay

Volumes:
- DELETE /volumes/{name}: timeout
- DELETE /libpod/volumes/{name}: timeout

Containers:
- GET /libpod/containers/stats: all
- POST /libpod/containers/{name}/restart: timeout
- POST /libpod/containers/{name}/resize: running

Images:
- POST /images/create: retry, retryDelay
- GET /images/json: shared-size

Exec:
- POST /libpod/exec/{id}/resize: running

Generate:
- GET /libpod/generate/{name}/systemd: templateUnitFile

Signed-off-by: Tim Zhou <tizhou@redhat.com>
2026-03-11 23:19:30 -04:00
Paul Holzinger
4f1d4ae8a0 fix new lint issues from prealloc
Fix a few new issues reported by the linter update.

There is no need to copy the capAdd/capDrop slice in the compat create
endpoint as they are only read and not modified.
For the other code preallocate the slices so we safe memory allocations.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-03-10 19:45:35 +01:00
Šimon Brauner
76095dbadc Make libpod return error status code on failure to pull image
Fixes: https://github.com/containers/podman/issues/22105

Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-03-09 14:26:14 +01:00
Jan Kaluza
01688e7621 Deprecate Legacy structs and use port.String()
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2026-03-09 11:09:28 +01:00
Jan Kaluza
c10f685b43 api/compat: Backport jsonmessage.JSONProgress.String()
The JSONProgress is not part of moby/moby API anymore:
f4127d76c5

To stay compatible with the previous client version, this commit backports
the jsonmessage.JSONProgress.String() and uses it to genereate
the progress report.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2026-03-09 11:09:28 +01:00
Jan Kaluza
65585e4338 compat/network: Remove temporary ipvAddress variables.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2026-03-09 11:09:28 +01:00
Jan Kaluza
56e555bfc2 api/compat: switch to moby/moby
Replace github.com/docker/docker API imports with github.com/moby/moby
across compat handlers, swagger models, and tests to align with upstream
type definitions.

Fixes: #27536.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2026-03-09 11:09:23 +01:00
Matt Heon
09ebdfa0b0 Merge pull request #28166 from mtrmac/platform-restriction
RFC: Add `(linux || freebsd)` build requirements
2026-03-03 10:27:57 -05:00
Miloslav Trmač
4c3027c149 Make most of libpod, and everything that relies on it, non-darwin
Require (linux || freebsd), because the code already does that, in practice.
This just means macOS users of IDEs aren't hit with thousands of compilation
errors (and then the IDE can open an Linux-specific file and then process it
under the Linux assumption, which works much better).

This commit ONLY replaces
	//go:build !remote
with
	//go:build !remote && (linux || freebsd)

and is split from the rest to allow mechanically verifying that fact,
and focusing a review on the other kinds of changes.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2026-02-27 22:18:36 +01:00
Tim Zhou
e914c30dd5 update swagger changes
Signed-off-by: Tim Zhou <tizhou@redhat.com>
2026-02-26 09:51:15 -05:00
Nalin Dahyabhai
474ff994b6 build: connect --source-policy-file, --mount for remote builds
Pass --mount settings and the contents of the --source-policy-file
argument to remote builds.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-18 14:11:12 +01:00
Jonathan Caicedo
b584337bd6 compat/api: honor VolumeOptions.Subpath for HostConfig.Mounts
fixes: #27171
Signed-off-by: Jonathan Caicedo <jonathan@jcaicedo.com>
2026-02-13 12:47:54 -05:00
Kir Kolyshkin
b046387979 Inline the initial slice into append
Instead of creating a slice and then appending to it, let's inline the
initial slice into append. This may or may not result in less slice
reallocations, but it is silencing the prealloc linter warnings.

This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-02-11 11:41:10 -08:00
Kir Kolyshkin
030057aecd Preallocate a slice
When we already know the resulting slice size but still need/want to use
append, it makes sense to preallocate the slice by using make with the
capacity argument.

This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-02-11 11:41:10 -08:00
Mayowa Fajobi
1bfd4cb95b Fix healthcheck argument with spaces split in Docker API (#27818)
Fixes: #26519

Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-02-03 12:49:28 +01:00
Nicola Sella
eb0c4716d3 Add GET /quadlets/{name}/exists
Fixes: https://issues.redhat.com/browse/RUN-4068

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-01-27 16:10:56 +01:00
Matt Heon
cb67dafd36 Merge pull request #26445 from aaron-ang/update-ulimit
Add ulimits to `podman update`
2026-01-16 08:38:00 -05:00
Nicola Sella
2e23fcc5a5 Add DELETE /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3742

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-01-15 12:10:32 +01:00
Matt Heon
ac91395e1d Merge pull request #27696 from MayorFaj/fix-logs-timestamp-precision
fix(logs): improve timestamp precision in container logs
2025-12-17 15:41:43 -05:00
Nicola Sella
3e6781f05a Add POST /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3743

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-12-17 14:37:12 +01:00
Paul Holzinger
254403dc03 Merge pull request #27426 from Honny1/local-api-artifact-add
Artifact add optimization on macOS and Windows
2025-12-12 16:49:50 +01:00
MayorFaj
2bbf26de0c fix(logs): add tests for nanosecond precision in log timestamps
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2025-12-06 12:17:39 +00:00
MayorFaj
60a5a476d5 fix(logs): improve timestamp precision in container logs
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2025-12-05 16:28:29 +00:00
Nicola Sella
ee0efb9fc6 Add GET /quadlets/{name}/file
Fixes: https://issues.redhat.com/browse/RUN-3716

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-11-26 16:52:44 +01:00
openshift-merge-bot[bot]
25c358e374 Merge pull request #27579 from Luap99/vendor
vendor: update common, image, storage to main
2025-11-21 16:50:48 +00:00
Paul Holzinger
d163c38a26 vendor: update common, image, storage to main
This also then bumps github.com/opencontainers/runtime-spec to v1.3.0
which contains breaking changes of the pid type as such we had to update
all the podman callers.

And tags.cncf.io/container-device-interface also used some changed
types from it and they have been updated in main so bump to the latest
commit there as well in order to get podman to compile properly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-21 14:24:29 +01:00
axel7083
d31f4e782d fix(api/compat): typo in the remove secret handle
Fixes https://github.com/containers/podman/issues/27548

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2025-11-21 13:06:52 +01:00
Aaron Ang
e0fc51eb68 Add ulimits to podman update API
Signed-off-by: Aaron Ang <aaron.angyd@gmail.com>
2025-11-20 22:59:50 -08:00
Jan Rodák
2f7094c0de Require absolute path for local API
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-11-19 18:20:37 +01:00
Jan Rodák
91af437471 Add local artifact add API endpoint
Fixes: https://issues.redhat.com/browse/RUN-3385
Fixes: https://github.com/containers/podman/issues/26321

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-11-19 18:20:29 +01:00
openshift-merge-bot[bot]
af91cae1c5 Merge pull request #27271 from lsm5/podman6-no-cgv1
Podman6: Remove cgroupsv1
2025-11-14 17:03:59 +00:00
openshift-merge-bot[bot]
ec2567ed48 Merge pull request #27534 from matejvasek/revert-copyuidgid-inversion
Revert "Fix copyUIDGID parameter inversion in Docker compat API"
2025-11-14 14:41:29 +00:00
Matej Vašek
65411d53c9 Revert "Fix copyUIDGID parameter inversion in Docker compat API"
This reverts commit 2b848cca36.

The official Docker API documentation was misleading here.
Testing shown that old podman behaviour was correct.
In docker copyUIDGID=true means that primary container uid/gid is used,
not the uid/gid from the tar stream.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2025-11-14 12:39:04 +01:00
Paul Holzinger
6f9bf07a34 swagger: fix for new docker/moby module conflict
image got converted to the new docker modules which were finally renamed
to moby[1]. Podman however still uses docker so now the swagger lookup
seems to find duplicated types which in general breaks the generation so
exclude the new module for now until we convert podman and fix the new
type issues swagger found.

[1] https://github.com/containers/container-libs/pull/459

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-14 12:29:27 +01:00
Lokesh Mandvekar
145540fed4 Remove ContainerStats.PerCPU: CGV1 only
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:34 -05:00
Lokesh Mandvekar
5e02967fd7 pkg/api/handlers/compat/containers_create.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:34 -05:00
Lokesh Mandvekar
5d7358d2bf pkg/api/handlers/libpod/containers_stats.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:33 -05:00
Paul Holzinger
5c1ed12d8d enable gofumpt formatter
Based on our discussion gofumpt won the vote so use that one via
golangci-lint.

https://github.com/containers/podman/discussions/27291

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-11 12:32:46 +01:00
openshift-merge-bot[bot]
80840578be Merge pull request #27395 from nalind/grpc-noop
Parse grpc requests on the service socket
2025-11-10 13:45:27 +00:00
openshift-merge-bot[bot]
ce561680bd Merge pull request #27431 from nimdrak/27421
Fixed #27421 aritfact push and pull with authfile
2025-11-06 10:08:39 +00:00