mirror of
https://github.com/containers/podman.git
synced 2026-03-30 20:43:40 -04:00
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>