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

fix:check docker daemon running? #2286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix:check docker daemon running? #2286

wants to merge 1 commit into from

Conversation

jokestax
Copy link
Contributor

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

err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return fmt.Errorf("Docker is not accessible: %v", err)
return fmt.Errorf("Docker is not accessible: %w", err)

@patrickdappollonio
Copy link
Member

At the risk of also threading too specifically, are you looking exactly for docker or any container tool?

Cc @johndietz

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.

2 participants