Skip to content

Add --format=json to inspect and list commands - #2936

Merged
thaJeztah merged 8 commits into
docker:masterfrom
silvin-lubecki:format-json
Mar 15, 2022
Merged

Add --format=json to inspect and list commands#2936
thaJeztah merged 8 commits into
docker:masterfrom
silvin-lubecki:format-json

Conversation

@silvin-lubecki

Copy link
Copy Markdown
Contributor

- What I did

  • Added a specific format key "json" to the inspector with the same behavior as empty string (outputing json by default). I also set "json" as a default value to all the format flags in inspect commands.
  • Added a specific format key "json" to the formatter, that is just an alias to the Golang template {{json .}} which outputs the inspected object as pure json.

⚠️ TODO: missing updating the format flag inspect commands help message to add the "json" case.

- How to verify it

  • For ls commands:
$ docker context ls --format=json
{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"https://kubernetes.docker.internal:6443 (default)","Name":"default","StackOrchestrator":"swarm"}
  • For inspect commands:
$ docker inspect 14c505d03da8 --format=json
[
{
"Id": "14c505d03da83e4d0c33b4cdbd2068429ebac253d2de05530d48918a6bed9782",
"Created": "2020-11-06T09:44:52.387624Z",
"Path": "/entrypoint.sh",
"Args": [
"/etc/docker/registry/config.yml"
],
...

- Description for the changelog

  • Add --format=json to inspect and list commands

- A picture of a cute animal (not mandatory but encouraged)
image

@silvin-lubecki
silvin-lubeckiforce-pushed the format-json branch 3 times, most recently from fc11c85 to f69b3c5CompareJanuary 19, 2021 08:48
@codecov-io

codecov-io commented Jan 19, 2021

Copy link
Copy Markdown

Codecov Report

Merging #2936 (da5084d) into master (9a3fdc1) will increase coverage by 0.03%.
The diff coverage is 75.75%.

@@ Coverage Diff @@## master #2936 +/- ##
==========================================
+ Coverage 57.04% 57.07% +0.03% 
==========================================
Files 297 297 Lines 18655 18659 +4 ==========================================
+ Hits 10641 10649 +8 + Misses 7154 7149 -5 - Partials 860 861 +1 

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall LGTM; left some comments.

Looks like we currently don't provide completion scripts for the format itself (https://github.com/docker/cli/blob/master/contrib/completion/bash/docker), but double-check in case I overlooked

Perhaps this special value should be documented in sections that describe the --format flag (especially for the list-type functions that don't use JSON as default); https://github.com/docker/cli/tree/master/docs/reference/commandline

Comment threadcli/command/formatter/formatter.go Outdated
Comment threadcli/command/formatter/formatter.go Outdated
Comment threadcli/command/inspect/inspector.go Outdated
@thaJeztah

Copy link
Copy Markdown
Member

@silvin-lubecki were you still working on this?

@silvin-lubecki
silvin-lubecki marked this pull request as ready for review March 10, 2021 09:31
@silvin-lubecki

Copy link
Copy Markdown
ContributorAuthor

@thaJeztah PTAL, I updated the format description and the documentation accordingly 👍

Comment threadcli/command/inspect/inspector.go Outdated
c.finalFormat = jsonFormat
}

c.finalFormat = strings.Trim(c.finalFormat, " ")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at slightly cleaning this up in a follow-up; looks like there's some steps here that may not be needed in all cases

func NewTemplateInspectorFromString(out io.Writer, tmplStr string) (Inspector, error) {
if tmplStr == "" {
if tmplStr == "" || tmplStr == "json" {
return NewIndentedInspector(out), nil

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one we need to have a look at, to see what would be best / make the JSON output most useful.

Currently, using '{{ json . }}' as format will not use pretty-print. That makes it hard to read, but potentially (likely?) more useful when processing the output (?)

docker inspect --format '{{ json . }}' foo
{"Id":"sha256:bf18dbdb03f7d053c623dcc7ad372dc9a687aa653c08898b5083a8940c29f02d","RepoTags":["foo:latest"],"RepoDigests":[],"Parent":"sha256:491198851f0ccdd0882cb9323f3856043d4e4c65b773e8eac3e0f6bc979a2ae7","Comment":"","Created":"2021-03-10T14:07:37.20034742Z","Container":"","ContainerConfig":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) COPY multi:539d0f63df854877d3aad06b13fd267ff9a979d372600ca5075a89f8ffbf4e3e in /work/config/ "],"Image":"sha256:491198851f0ccdd0882cb9323f3856043d4e4c65b773e8eac3e0f6bc979a2ae7","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"DockerVersion":"20.10.2","Author":"","Config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["sh"],"Image":"sha256:491198851f0ccdd0882cb9323f3856043d4e4c65b773e8eac3e0f6bc979a2ae7","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"Architecture":"amd64","Os":"linux","Size":1231733,"VirtualSize":1231733,"GraphDriver":{"Data":{"LowerDir":"/var/lib/docker/overlay2/52d1c55b0fb27d947e9298f54d9ffb9e3bcdde45aa8b0b5c2940fb6a8eaa5c30/diff","MergedDir":"/var/lib/docker/overlay2/bde48edd93ce919389f68d17145c534556cc4444d7238477b6f95a4ec70a6c1b/merged","UpperDir":"/var/lib/docker/overlay2/bde48edd93ce919389f68d17145c534556cc4444d7238477b6f95a4ec70a6c1b/diff","WorkDir":"/var/lib/docker/overlay2/bde48edd93ce919389f68d17145c534556cc4444d7238477b6f95a4ec70a6c1b/work"},"Name":"overlay2"},"RootFS":{"Type":"layers","Layers":["sha256:84009204da3f70b09d2be3914e12844ae9db893aa85ef95df83604f95df05187","sha256:ab70170e9d91c94b190c2a3c8a519c24755055a2a52ba40a9ad6cce47bab820a"]},"Metadata":{"LastTagTime":"2021-03-10T14:07:37.293854938Z"}}

The default output (no --format) on the other hand does use pretty-print (output truncated);

docker inspect foo
[
{
"Id": "sha256:bf18dbdb03f7d053c623dcc7ad372dc9a687aa653c08898b5083a8940c29f02d",
"RepoTags": [
"foo:latest"
],
"RepoDigests": [],
"Parent": "sha256:491198851f0ccdd0882cb9323f3856043d4e4c65b773e8eac3e0f6bc979a2ae7",
"Comment": "",
"Created": "2021-03-10T14:07:37.20034742Z"
}
]

So, I'm a bit on the fence what's most useful;

  • do we need separate json and json-pretty (e.g.) options?
  • if we do, do we also need the same in templates (--format '{{ jsonpretty .Foo.Bar }}' ?
  • does pretty-print make processing the output more difficult to use in scripts?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right about the pretty vs non-pretty. I'd be in favor of keeping the pretty json print with no format, and change here the way we print when json is set with non-pretty.
That way the output would be consistent between inspect and list commands.
We could keep the jsonpretty format option idea for a follow up eventually, I guess this PR is big enough 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My two cents,

Parsing JSON shouldn't be different between a pretty-printed and a minimized output. I would like to have all json pretty-printed by default (and only option).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing JSON shouldn't be different between a pretty-printed and a minimized output. I would like to have all json pretty-printed by default (and only option).

JSON is not for humans, so from that perspective, the default should not necessarily be "nicely formatted". To format it nicely, jq is a good option (although I wouldn't be fully against having a built-in way to do pretyjson). There's some reasons why it's still useful to default to "non-pretty-print";

I agree that either "pretty" or "non-pretty" should work if you're using a JSON parser (which of course is the preferred way to deal with JSON). However, this may not always be what people use, and in some cases may not be needed. It also depends a bit on what kind of JSON (single result, multiple?) which can be the case for bothdocker inspect (docker inspect <foo> <bar> <baz>), and by default on (e.g.) docker ps.

Here's the JSON output for a docker ps;

docker ps --format '{{ json .}}'
{"Command":"\"/bin/bash\"","CreatedAt":"2022-03-08 09:29:44 +0100 CET","ID":"059a153f844c","Image":"fedora:35","Labels":"maintainer=Clement Verna \u003ccverna@fedoraproject.org\u003e","LocalVolumes":"0","Mounts":"","Names":"stupefied_kirch","Networks":"bridge","Ports":"","RunningFor":"2 hours ago","Size":"553MB (virtual 706MB)","State":"running","Status":"Up 2 hours"}
{"Command":"\"/docker-entrypoint.…\"","CreatedAt":"2022-03-06 18:27:30 +0100 CET","ID":"b778cbd0fc54","Image":"nginx:alpine","Labels":"maintainer=NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e","LocalVolumes":"1","Mounts":"myvolume","Names":"foo","Networks":"bridge","Ports":"80/tcp","RunningFor":"41 hours ago","Size":"1.09kB (virtual 22.9MB)","State":"running","Status":"Up 41 hours"}
{"Command":"\"/bin/sh\"","CreatedAt":"2022-03-05 12:24:21 +0100 CET","ID":"5b88bd2598fc","Image":"quay.io/goswagger/swagger:0.7.4","Labels":"","LocalVolumes":"0","Mounts":"","Names":"keen_dubinsky","Networks":"bridge","Ports":"","RunningFor":"2 days ago","Size":"83B (virtual 304MB)","State":"running","Status":"Up 2 days"}
{"Command":"\"/usr/bin/gotty --ti…\"","CreatedAt":"2022-01-06 10:38:22 +0100 CET","ID":"564795c2a515","Image":"thajeztah/ddshell","Labels":"com.docker.desktop.extension.api.version=0.1.0,com.docker.compose.config-hash=4909202d146df86995d6d1e254f94e8f9fd4c084a46ae58c7396d16f81b4bcff,com.docker.compose.container-number=1,com.docker.compose.project=thajeztah_ddshell-desktop-extension,com.docker.compose.project.working_dir=/Users/sebastiaan/Library/Containers/com.docker.docker/Data/plugins/thajeztah_ddshell/vm,com.docker.compose.service=ddshell,com.docker.compose.image=sha256:8fc0de0137378ca03f30d718801d9520c6f0bd323247c5cb7ba26b8b53c24037,com.docker.compose.project.config_files=/Users/sebastiaan/Library/Containers/com.docker.docker/Data/plugins/thajeztah_ddshell/vm/docker-compose.yml,com.docker.compose.version=2.2.2,com.docker.compose.oneoff=False,org.opencontainers.image.description=Docker Desktop Shell Extension,org.opencontainers.image.title=DDShell,com.docker.compose.depends_on=,com.docker.desktop.plugin=true,com.docker.desktop.plugin.name=DDShell,org.opencontainers.image.vendor=Docker Inc.","LocalVolumes":"0","Mounts":"","Names":"thajeztah_ddshell-desktop-extension-service","Networks":"thajeztah_ddshell-desktop-extension_default","Ports":"0.0.0.0:8129-\u003e8080/tcp","RunningFor":"2 months ago","Size":"0B (virtual 15.8MB)","State":"running","Status":"Up 4 days"}
{"Command":"\"/docker-entrypoint.…\"","CreatedAt":"2022-01-05 18:49:16 +0100 CET","ID":"0f1509f6a292","Image":"crazymax/ddext-docs:latest","Labels":"com.docker.compose.config-hash=27fb4a55efe1da12162dddb2ffc7a7799d3efe72a44b1e477bffc68ce4172aa8,com.docker.compose.depends_on=,com.docker.compose.service=devenv-volumes,com.docker.desktop.extension.api.version=0.1.0,maintainer=NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e,org.opencontainers.image.description=Docs Extension.,com.docker.compose.container-number=1,com.docker.compose.project=crazymax_ddext-docs-desktop-extension,com.docker.compose.project.config_files=/Users/sebastiaan/Library/Containers/com.docker.docker/Data/plugins/crazymax_ddext-docs/vm/docker-compose.yml,com.docker.compose.version=2.2.2,com.docker.desktop.plugin=true,com.docker.compose.oneoff=False,org.opencontainers.image.vendor=Docker Inc.,com.docker.compose.image=sha256:c61d6db054191c8b57bd019cc0a4e6b98b8af194226f6b30ff6aae630693553b,com.docker.compose.project.working_dir=/Users/sebastiaan/Library/Containers/com.docker.docker/Data/plugins/crazymax_ddext-docs/vm,com.docker.desktop.plugin.name=DocExt,org.opencontainers.image.title=DocExt","LocalVolumes":"0","Mounts":"","Names":"crazymax_ddext-docs-desktop-extension-service","Networks":"crazymax_ddext-docs-desktop-extension_default","Ports":"80/tcp, 0.0.0.0:8123-\u003e4000/tcp","RunningFor":"2 months ago","Size":"2B (virtual 99.5MB)","State":"running","Status":"Up 4 days"}

That's not very "readable", BUT one thing that helps is that it's 1 line per container. This means, I can do things like;

docker ps --format '{{ json .}}'| grep fedora
{"Command":"\"/bin/bash\"","CreatedAt":"2022-03-08 09:29:44 +0100 CET","ID":"059a153f844c","Image":"fedora:35","Labels":"maintainer=Clement Verna \u003ccverna@fedoraproject.org\u003e","LocalVolumes":"0","Mounts":"","Names":"stupefied_kirch","Networks":"bridge","Ports":"","RunningFor":"2 hours ago","Size":"553MB (virtual 706MB)","State":"running","Status":"Up 2 hours"}

Because grep is easy to use/remember, whereas it's difficult to remember what options to use for --filter, or what options to use for jq to "query results".

In this case, I can still "pretty print" the output with jq by just piping it;

docker ps --format '{{ json .}}'| grep fedora | jq
{
"Command": "\"/bin/bash\"",
"CreatedAt": "2022-03-08 09:29:44 +0100 CET",
"ID": "059a153f844c",
"Image": "fedora:35",
"Labels": "maintainer=Clement Verna <cverna@fedoraproject.org>",
"LocalVolumes": "0",
"Mounts": "",
"Names": "stupefied_kirch",
"Networks": "bridge",
"Ports": "",
"RunningFor": "2 hours ago",
"Size": "553MB (virtual 706MB)",
"State": "running",
"Status": "Up 2 hours"
}

Or extract just a single field with it (.SomeField is something that's );

docker ps --format '{{ json .}}'| grep fedora | jq .CreatedAt
"2022-03-08 09:29:44 +0100 CET"

@thaJeztahthaJeztahMar 8, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that JSON is not for humans, I would be tempted to say the default should be the reverse (so never pretty-print by default). Unfortunately, we already have (e.g.) docker inspect doing a pretty(ish) print by default, but we could (I think I commented that above) say that if you (explicitly) pass --format=json that that always prints "non-pretty".

That way users can expect that --format=json will always produce the same kind of output (non-pretty, one line per "object" / "result")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is already the case:

./build/docker context ls --format=json{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","Name":"default"}{"Current":false,"Description":"","DockerEndpoint":"tcp://localhost:12375","KubernetesEndpoint":"","Name":"dind"}
./build/docker context ls --format='{{ json .}}'{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","Name":"default"}{"Current":false,"Description":"","DockerEndpoint":"tcp://localhost:12375","KubernetesEndpoint":"","Name":"dind"}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that JSON is not for humans

Not sure I agree here but I'm fine having --format=json print a minimized json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, all inspect commands will output a compact JSON representation of the elements with --format=json

Comment threaddocs/reference/commandline/node_ls.md
```

To print all the nodes with json output, use `json` directive:
```bash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this to console? (I'll be updating other occurrences, so I could do that at the same time if needed; some background why console here: docker/docs#12425)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for some of the other docs that were added

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 👍

35o6tiywb700jesrt3dmllaza: swarm-worker1 Needs Rotation
```

To print all the nodes with json output, use `json` directive:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a blank line between the text and the code block? Also perhaps;

Suggested change
To print all the nodes with json output, use `json` directive:
To print all nodes in JSON format, use the`json` directive:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also for the other docs that were added (JSON uppercase, "thejson directive"


Options:
-f, --format string Format the output using the given Go template
-f, --format string Format the output using the given Go template (default "json")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed updating this page (help output), or is it different?


Options:
-f, --format string Format the output using the given Go template
-f, --format string Format the output using the given Go template (default "json")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also missed this one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inspect commands are different, they can't show the output in a table. I updated the inspect commands help to output:

./build/docker volume inspect --help Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]Display detailed information on one or more volumesOptions: -f, --format string Format output using a custom template: 'json': Print in JSON format '<TEMPLATE>': Print output using the given Go template. Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates (default "json")

Comment threadman/src/image/ls.md Outdated
Comment on lines +81 to +82
inserting tab spacing between columns. `json` directive will output objects
with JSON format.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
inserting tab spacing between columns. `json` directive will output objects
with JSON format.
inserting tab spacing between columns. The `json` directive outputs objects
Suggested change
inserting tab spacing between columns. `json` directive will output objects
with JSON format.
inserting tab spacing between columns. The `json` directive outputs objects
in JSON format.

@codecov-commenter

codecov-commenter commented Mar 3, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2936 (9c0234b) into master (d977030) will increase coverage by 0.05%.
The diff coverage is 84.37%.

@@ Coverage Diff @@## master #2936 +/- ##
==========================================
+ Coverage 59.00% 59.05% +0.05% 
==========================================
Files 284 284 Lines 23857 23852 -5 ==========================================
+ Hits 14076 14086 +10 + Misses 8920 8907 -13 + Partials 861 859 -2 

@rumpl
rumplforce-pushed the format-json branch 6 times, most recently from c6a0220 to d09afc0CompareMarch 8, 2022 14:07

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found one debugging leftover; also left a tiny nit (but I'm ok if we fix that later; it may be a bit of a pain to search for all of them)

looking good overall though! nice

Comment threadcli/command/container/inspect.go Outdated
getRefFunc := func(ref string) (interface{}, []byte, error) {
return client.ContainerInspectWithRaw(ctx, ref, opts.size)
}
fmt.Println(opts.format)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was for debugging 🤔 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops :)

Comment threadcli/flags/common.go Outdated
// FormatHelp describes the --format flag behavior for list commands
FormatHelp = `Format output using a custom template:
'table': Print output in table format with column headers (default)
'table <TEMPLATE>': Print output in table format using the given Go template

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this works well with our markdown and html rendering (wondering if the <> would be hidden in the generated HTML (something we should check 😅).

Otherwise we could also consider to make it TEMPLATE (without brackets)

Comment on lines +350 to +352
To list all images in JSON format, use the `json` directive:
```console

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nit: If you're updating, can you add an empty line here between the text and the code block?

Comment on lines +238 to +240
To list all networks in JSON format, use the `json` directive:
```console

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@rumpl
rumplforce-pushed the format-json branch 2 times, most recently from f32d638 to 8c10a0aCompareMarch 14, 2022 12:58
…put json, as empty flag does.
Added tests on that new behavior.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
… an alias to `{{json .}}`
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
silvin-lubeckiand others added 5 commits March 15, 2022 15:35
including all the directives and a link to the documentation.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
With this change all `inspect` commands will output a compact JSON
representation of the elements, the default format (indented JSON) stays the
same.
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
Member

Did a rebases, and some nits in the docs (<TEMPLATE> -> TEMPLATE)

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

let's get this one in, thanks everyone 👍

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@silvin-lubecki@codecov-io@thaJeztah@codecov-commenter@rumpl