From adde67c74f265c2f4c9245b975d531dd635dce8e Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Mon, 5 Oct 2020 19:25:45 +0800 Subject: fix apiv2 /containers/$name/json return wrong value in `.Config.StopSignal` Signed-off-by: zhangguanzhang --- pkg/api/handlers/compat/containers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/api/handlers') diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go index 3a904ba87..637d296e7 100644 --- a/pkg/api/handlers/compat/containers.go +++ b/pkg/api/handlers/compat/containers.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "net/http" + "strconv" "strings" "syscall" @@ -385,7 +386,7 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, MacAddress: "", OnBuild: nil, Labels: l.Labels(), - StopSignal: string(l.StopSignal()), + StopSignal: strconv.Itoa(int(l.StopSignal())), StopTimeout: &stopTimeout, Shell: nil, } -- cgit v1.2.3-54-g00ecf