Proposal: Consistent inspect/output from CLI
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
When going through the different cli commands, the output tends to differ based on the command being used.
Although this has been there for ever, it'd be great to standardize it and allow more flexibility.
Steps to reproduce the issue:
- Get docker up and running
- Check
docker info- notice the 'pretty print'. How do you get that in a JSON format? - Check
docker node inspect self- notice the jSON output. But you do have the option to--prettyprint.
Describe the results you received:
All outputs are different based on the command that you're executing
Describe the results you expected:
I expect all of my outputs to be in JSON or pretty-print format. I also expect all commands to support the --pretty flag in order to get a cleaner output.
For example, inspecting a container, gives a JSON output, but there is no --pretty support:
$ docker container inspect 1c0 --pretty
unknown flag: --pretty
Additional information you deem important (e.g. issue happens only occasionally):
This has been in the CLI for ever and isn't a huge deal, more of an annoyance.
Output of docker version:
$ docker version
Client:
Version: 17.09.0-ce-rc1
API version: 1.31
Go version: go1.8.3
Git commit: ae21824
Built: Wed Sep 6 22:25:36 2017
OS/Arch: darwin/amd64
Server:
Version: 17.09.0-ce-rc1
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: ae21824
Built: Wed Sep 6 22:31:19 2017
OS/Arch: linux/amd64
Experimental: true
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the output and available flags for docker info, docker node inspect self, and docker container inspect. Define the desired JSON and pretty-print behavior, including consistent --pretty support, before locating the affected CLI commands and deciding how completion will be tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100