cli
cli copied to clipboard
cli: set a timeout for the initial connection ping
Note that this does not fully fix the referenced issue, but at least makes sure that API clients don't hang forever on the initialization step. (now it hangs on a later request)
See: https://github.com/docker/cli/issues/3652
- What I did see attached issue
- How I did it see attached issue
- How to verify it
The docker ps in the attached issue still hangs, but now hangs at a later step. You can see this by running kill -s ABRT on the hung process to see where it's hanging
- Description for the changelog Add timeout to initial docker client initialization
- A picture of a cute animal (not mandatory but encouraged)

Codecov Report
Merging #3663 (26a1841) into master (b75c262) will increase coverage by
0.08%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #3663 +/- ##
==========================================
+ Coverage 59.02% 59.11% +0.08%
==========================================
Files 289 289
Lines 24626 24684 +58
==========================================
+ Hits 14535 14591 +56
- Misses 9218 9220 +2
Partials 873 873
@vvoland is there anything left you need from me on this? (i don't have permission to merge the PR)
Looks good to me, but maybe @thaJeztah would like to take a look?
I did a quick squash and rebase of this PR in https://github.com/docker/cli/pull/3722
(I'll rebase this one to restore the WithInitializeTimeout() for further discussion 👍
squashed this one!
ya, the WithInitializeTimeout() bit isn't hard to add, and i'm not attached to it.
got merged in https://github.com/docker/cli/pull/3722