-
Notifications
You must be signed in to change notification settings - Fork 142
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
fix:check docker daemon running? #2286
base: main
Are you sure you want to change the base?
Conversation
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap the error my friend 😆
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
err = docker.Checkstatus() | ||
if err != nil { | ||
log.Info().Msgf("%s", err) | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap error
|
||
_, err = cli.Ping(context.Background()) | ||
if err != nil { | ||
return fmt.Errorf("Docker is not accessible: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("Docker is not accessible: %v", err) | |
return fmt.Errorf("Docker is not accessible: %w", err) |
At the risk of also threading too specifically, are you looking exactly for docker or any container tool? Cc @johndietz |
Description
Added a function to check if docker is installed and if installed running or not
How to test
Build the binary and run "./kubefirst k3d create" or any cloud provider