mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-07 22:47:49 +00:00
The Docker compat /containers/json endpoint was leaking podman-internal
container states ("stopped", "stopping") that are not valid Docker API
states. Docker clients that strictly validate the State field against
the documented set ("created", "running", "paused", "restarting",
"exited", "removing", "dead") would fail with deserialization errors.
LibpodToContainerJSON already performs this mapping correctly:
- "stopped" → "exited"
- "stopping" → "running"
Apply the same remapping in LibpodToContainer using a switch statement
so the list endpoint behaves consistently with the inspect endpoint.
Add a test assertion to the compat /containers/json test to verify
that a stopped container is reported with State="exited".
Fixes #28359
Signed-off-by: crawfordxx <crawfordxx@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| grpcpb | ||
| handlers | ||
| server | ||
| types | ||
| Makefile | ||
| tags.yaml | ||