diff options
author | umohnani8 <umohnani@redhat.com> | 2018-02-05 10:42:14 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-06 19:31:55 +0000 |
commit | 367213a3943961126c6f7c1dce45c7fafea9e6b2 (patch) | |
tree | 758846f65e55f4f005b03fbfd5d81933db6cf437 /cmd/podman | |
parent | 69d75a82515b6b4270cd6b72617cff1531f9ceca (diff) | |
download | podman-367213a3943961126c6f7c1dce45c7fafea9e6b2.tar.gz podman-367213a3943961126c6f7c1dce45c7fafea9e6b2.tar.bz2 podman-367213a3943961126c6f7c1dce45c7fafea9e6b2.zip |
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 <umohnani@redhat.com>
Closes: #292
Approved by: rhatdan
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/inspect.go | 7 |
1 files changed, 4 insertions, 3 deletions
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, |