Docker returns 'die' status rather then 'died' status

In order to be more compatible with Docker, we should return a
container die status rather then a "container died", Too late to
change this for Podman.

Partially fixes: https://github.com/containers/podman/issues/10168

[NO TESTS NEEDED] No easy way to test this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2021-04-28 14:32:38 -04:00
parent 928dce57df
commit 92371d6382
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
}
e := entities.ConvertToEntitiesEvent(*evt)
if !utils.IsLibpodRequest(r) && e.Status == "died" {
e.Status = "die"
}
if err := coder.Encode(e); err != nil {
logrus.Errorf("unable to write json: %q", err)
}