Option to set contexts format in config.json
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
The Docker CLI config file (config.json) allows the output format of many CLI commands to be customized (e.g., psFormat for listing containers). There is no options for customizing the output format of the docker context ls command.
Steps to reproduce the issue:
- Run
docker context ls --format 'table {{ .Name }}\t{{ .Description }}'. - Attempt to set this as the default format in
config.json.
Describe the results you received:
There is no config option for setting the output format of the docker context ls command.
Describe the results you expected:
A config option like "contextsFormat" for setting the output format of the docker context ls command.
Additional information you deem important (e.g. issue happens only occasionally):
Config file options are defined in cli/config/configfile/file.go.
Output of docker version:
Client: Docker Engine - Community
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:12:42 2020
OS/Arch: darwin/amd64
Context: default
Experimental: true
Output of docker info:
Not applicable.
Additional environment details (AWS, VirtualBox, physical, etc.):
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 with cli/config/configfile/file.go, where Docker CLI config options are defined, then trace the docker context ls command's formatting path. Add support for a contextsFormat configuration option matching the existing command-line format behavior, and verify that config.json controls the default output while --format still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100