From 367213a3943961126c6f7c1dce45c7fafea9e6b2 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Mon, 5 Feb 2018 10:42:14 -0500 Subject: Match podman inspect output to docker inspect Made a change to make sure that the output paths of podman inspect matches that of docker inspect. For example to get the stop signal you should be able to do podman inspect ctr --format {{.Config.StopSignal}} and the same thing in docker will give the same results. Signed-off-by: umohnani8 Closes: #292 Approved by: rhatdan --- cmd/podman/inspect.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go index 2e70eaa0a..ba7b17ed7 100644 --- a/cmd/podman/inspect.go +++ b/cmd/podman/inspect.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/projectatomic/libpod/cmd/podman/formats" @@ -163,8 +164,8 @@ func getCtrInspectInfo(ctr *libpod.Container, ctrInspectData *inspect.ContainerI } data := &inspect.ContainerData{ - CtrInspectData: ctrInspectData, - HostConfig: &inspect.HostConfig{ + ctrInspectData, + &inspect.HostConfig{ ConsoleSize: spec.Process.ConsoleSize, OomScoreAdj: spec.Process.OOMScoreAdj, CPUShares: shares, @@ -210,7 +211,7 @@ func getCtrInspectInfo(ctr *libpod.Container, ctrInspectData *inspect.ContainerI Ulimits: createArtifact.Resources.Ulimit, SecurityOpt: createArtifact.SecurityOpts, }, - Config: &inspect.CtrConfig{ + &inspect.CtrConfig{ Hostname: spec.Hostname, User: spec.Process.User, Env: spec.Process.Env, -- cgit v1.2.3-54-g00ecf