spiegel_podman/pkg/api/handlers/compat
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
..
auth.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
changes.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers.go Deprecate Legacy structs and use port.String() 2026-03-09 11:09:28 +01:00
containers_archive.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_attach.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_create.go compat: return 409 Conflict when container name is already in use 2026-03-13 09:53:04 -07:00
containers_export.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_logs.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_pause.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_prune.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_restart.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_start.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_stats.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_stats_freebsd.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
containers_stats_linux.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
containers_stop.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_top.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
containers_unpause.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
events.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
exec.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
images.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
images_build.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
images_history.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
images_prune.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
images_push.go Deprecate Legacy structs and use port.String() 2026-03-09 11:09:28 +01:00
images_remove.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
images_save.go set !remote build tags where needed 2024-08-19 11:41:28 +02:00
images_search.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
images_tag.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
info.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
networks.go api/compat: Backport jsonmessage.JSONProgress.String() 2026-03-09 11:09:28 +01:00
ping.go compat: GET /_ping return Builder-Version: 1 2025-07-31 10:17:52 +02:00
resize.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
secrets.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
system.go Deprecate Legacy structs and use port.String() 2026-03-09 11:09:28 +01:00
types.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
unsupported.go Bump Go version to v6 2025-10-23 11:00:15 -04:00
version.go Make most of libpod, and everything that relies on it, non-darwin 2026-02-27 22:18:36 +01:00
volumes.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00