Skip to content

Option to set contexts format in config.json #2924

@kinghuang

Description

@kinghuang

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:

  1. Run docker context ls --format 'table {{ .Name }}\t{{ .Description }}'.
  2. 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.):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions