8000 Ping the docker daemon to check if it is up by 8W9aG · Pull Request #1838 · replicate/cog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ping the docker daemon to check if it is up #1838

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

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Ping the docker daemon to check if it is up #1838

merged 3 commits into from
Jul 31, 2024

Conversation

8W9aG
Copy link
Contributor
@8W9aG 8W9aG commented Jul 30, 2024
  • Send a ping to the docker daemon directly using the golang docker client.
  • Give it 5 seconds to answer, if it doesn’t answer send a warning to the user.
  • Solves: Cog hangs if docker hangs #1827

* Send a ping to the docker daemon directly using
the golang docker client.
* Give it 5 seconds to answer, if it doesn’t
answer send a warning to the user.
@8W9aG 8W9aG requested a review from mattt July 30, 2024 21:41
mattt added 2 commits July 31, 2024 03:19
Update ping to return error instead of printing

Update ping to take context and duration arguments
Copy link
Contributor
@mattt mattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @8W9aG! I reworked some of the code, moving the Ping method to the docker package and making the CLI responsible for communicating with the end user. I also copied that check to the other CLI subcommands that invoked Docker.

If this looks good to you, feel free to merge 😄

@8W9aG
Copy link
Contributor Author
8W9aG commented Jul 31, 2024

Thanks, @8W9aG! I reworked some of the code, moving the Ping method to the docker package and making the CLI responsible for communicating with the end user. I also copied that check to the other CLI subcommands that invoked Docker.

If this looks good to you, feel free to merge 😄

Looks great thanks so much!

@8W9aG 8W9aG merged commit 592f768 into main Jul 31, 2024
12 checks passed
@8W9aG 8W9aG deleted the ping-docker branch July 31, 2024 12:26
8W9aG added a commit that referenced this pull request Jul 31, 2024
mattt pushed a commit that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0