Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.0 backport] fix docker info, docker version --format=json not outputting json format #4230

Merged
merged 4 commits into from
Apr 26, 2023

Conversation

thaJeztah
Copy link
Member

fix docker info --format=json not outputting json format

The --format=json option was added for all inspect commands, but was not implemented for "docker info". This patch implements the missing option.

Before this patch:

docker info --format=json
json

With this patch applied:

docker info --format=json
{"ID":"80c2f18a-2c88-4e4a-ba69-dca0eea59835","Containers":7,"ContainersRunning":"..."}

fix docker version --format=json not outputting json format

The --format=json option was added for all inspect commands, but was not
implemented for "docker version". This patch implements the missing option.

Before this patch:

docker version --format=json
json

With this patch:

docker version --format=json
{"Client":{"Platform":{"Name":""},"Version":"24.0.0-dev","ApiVersion":"..."}}

- Description for the changelog

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1aaa179)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The --format=json option was added for all inspect commands, but was not implemented
for "docker info". This patch implements the missing option.

Before this patch:

    docker info --format=json
    json

With this patch applied:

    docker info --format=json
    {"ID":"80c2f18a-2c88-4e4a-ba69-dca0eea59835","Containers":7,"ContainersRunning":"..."}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 46234b8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 80640bc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The --format=json option was added for all inspect commands, but was not
implemented for "docker version". This patch implements the missing option.

Before this patch:

    docker version --format=json
    json

With this patch:

    docker version --format=json
    {"Client":{"Platform":{"Name":""},"Version":"24.0.0-dev","ApiVersion":"..."}}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 23bd746)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 23.0.5 milestone Apr 26, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #4230 (f914316) into 23.0 (ced769f) will increase coverage by 0.01%.
The diff coverage is 90.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             23.0    #4230      +/-   ##
==========================================
+ Coverage   58.83%   58.84%   +0.01%     
==========================================
  Files         572      572              
  Lines       49610    49608       -2     
==========================================
+ Hits        29188    29192       +4     
+ Misses      18648    18642       -6     
  Partials     1774     1774              

@thaJeztah thaJeztah merged commit 8e00eb4 into docker:23.0 Apr 26, 2023
@thaJeztah thaJeztah deleted the 23.0_backport_docker_info_json branch April 26, 2023 11:00
@docker docker deleted a comment Oct 17, 2023
@docker docker deleted a comment Oct 17, 2023
Sign up for free to 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.

3 participants