Skip to content

cli/command/system: fix "docker events" not supporting --format=json - #4530

Merged
neersighted merged 1 commit into
docker:masterfrom
thaJeztah:fix_events_json_format
Aug 29, 2023
Merged

cli/command/system: fix "docker events" not supporting --format=json#4530
neersighted merged 1 commit into
docker:masterfrom
thaJeztah:fix_events_json_format

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

Before this patch:

docker events --format=json
json
json
json
^C

With this patch:

docker events --format=json
{"status":"create","id":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","from":"hello-world","Type":"container","Action":"create","Actor":{"ID":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","Attributes":{"image":"hello-world","name":"dreamy_goldstine"}},"scope":"local","time":1693168508,"timeNano":1693168508190136885}
{"status":"attach","id":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","from":"hello-world","Type":"container","Action":"attach","Actor":{"ID":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","Attributes":{"image":"hello-world","name":"dreamy_goldstine"}},"scope":"local","time":1693168508,"timeNano":1693168508192851593}
{"Type":"network","Action":"connect","Actor":{"ID":"c54920dd5074a73e28bea62007e0334d81cc040a90372be311cf16806403d350","Attributes":{"container":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","name":"bridge","type":"bridge"}},"scope":"local","time":1693168508,"timeNano":1693168508212398802}
{"status":"start","id":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","from":"hello-world","Type":"container","Action":"start","Actor":{"ID":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","Attributes":{"image":"hello-world","name":"dreamy_goldstine"}},"scope":"local","time":1693168508,"timeNano":1693168508312969843}
^C

- What I did

- How I did it

- How to verify it

- Description for the changelog

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

@thaJeztah
thaJeztahforce-pushed the fix_events_json_format branch 3 times, most recently from bec3578 to 543b950CompareAugust 27, 2023 23:56
@thaJeztahthaJeztah added this to the 25.0.0 milestone Aug 28, 2023
@thaJeztah
thaJeztahforce-pushed the fix_events_json_format branch from 543b950 to 8f1203cCompareAugust 28, 2023 08:17
@codecov-commenter

codecov-commenter commented Aug 28, 2023

Copy link
Copy Markdown

Codecov Report

Merging #4530 (a0121f6) into master (a1367a0) will increase coverage by 0.27%.
The diff coverage is 81.25%.

Additional details and impacted files
@@ Coverage Diff @@## master #4530 +/- ##
==========================================
+ Coverage 59.38% 59.66% +0.27% 
==========================================
Files 288 286 -2 Lines 24785 24782 -3 ==========================================
+ Hits 14718 14785 +67 + Misses 9186 9111 -75 - Partials 881 886 +5 

@thaJeztah
thaJeztahforce-pushed the fix_events_json_format branch 4 times, most recently from d190206 to 7a684efCompareAugust 28, 2023 19:10
@thaJeztah

This comment was marked as resolved.

@thaJeztah
thaJeztahforce-pushed the fix_events_json_format branch 3 times, most recently from 5b3139e to 1ecb6b7CompareAugust 29, 2023 12:36
@thaJeztah
thaJeztah marked this pull request as draft August 29, 2023 12:42
Before this patch:
docker events --format=json
json
json
json
^C
With this patch:
docker events --format=json
{"status":"create","id":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","from":"hello-world","Type":"container","Action":"create","Actor":{"ID":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","Attributes":{"image":"hello-world","name":"dreamy_goldstine"}},"scope":"local","time":1693168508,"timeNano":1693168508190136885}
{"status":"attach","id":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","from":"hello-world","Type":"container","Action":"attach","Actor":{"ID":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","Attributes":{"image":"hello-world","name":"dreamy_goldstine"}},"scope":"local","time":1693168508,"timeNano":1693168508192851593}
{"Type":"network","Action":"connect","Actor":{"ID":"c54920dd5074a73e28bea62007e0334d81cc040a90372be311cf16806403d350","Attributes":{"container":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","name":"bridge","type":"bridge"}},"scope":"local","time":1693168508,"timeNano":1693168508212398802}
{"status":"start","id":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","from":"hello-world","Type":"container","Action":"start","Actor":{"ID":"4ac3bba8abd68961e627540fed81ad16d55b88e45629d7cdb792126d09b6488d","Attributes":{"image":"hello-world","name":"dreamy_goldstine"}},"scope":"local","time":1693168508,"timeNano":1693168508312969843}
^C
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztah marked this pull request as ready for review August 29, 2023 12:49
@thaJeztah
thaJeztahforce-pushed the fix_events_json_format branch from a0121f6 to 6dfdd1eCompareAugust 29, 2023 12:49
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.

4 participants

@thaJeztah@codecov-commenter@rumpl@neersighted