From 2e96acf3007cbd05a37a8af7156f0abda073cb5a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 11 Feb 2018 06:05:29 -0500 Subject: Change json to match docker inspect Changing these fields caused the output of podman inspect to more closely match docker inspect. Signed-off-by: Daniel J Walsh Closes: #306 Approved by: mheon --- cmd/podman/inspect.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/podman/inspect.go') diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go index 84107f3db..ce5a3b823 100644 --- a/cmd/podman/inspect.go +++ b/cmd/podman/inspect.go @@ -78,6 +78,10 @@ func inspectCmd(c *cli.Context) error { inspectType = inspectTypeContainer } outputFormat := c.String("format") + if strings.Contains(outputFormat, "{{.Id}}") { + outputFormat = strings.Replace(outputFormat, "{{.Id}}", formats.IDString, -1) + } + var data interface{} switch inspectType { case inspectTypeContainer: -- cgit v1.2.3-54-g00ecf