From 116a276e8ca28beca9e60a21680ab3cb94fd5aa1 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 17 Dec 2021 15:23:34 +0100 Subject: legacy events: also set exitCode For Status = "die", Docker sets the exit code of the container to a field "exitCode". Podman uses "containerExitCode". Copy the value into "exitCode" as well, for compatibility. Signed-off-by: Leah Neukirchen --- pkg/api/handlers/compat/events.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/api/handlers') diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go index 4f23e681f..bc31a36c4 100644 --- a/pkg/api/handlers/compat/events.go +++ b/pkg/api/handlers/compat/events.go @@ -92,6 +92,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) { if !utils.IsLibpodRequest(r) && e.Status == "died" { e.Status = "die" e.Action = "die" + e.Actor.Attributes["exitCode"] = e.Actor.Attributes["containerExitCode"] } if err := coder.Encode(e); err != nil { -- cgit v1.2.3-54-g00ecf