Skip to content

fix:check docker daemon running?#2286

Open
jokestax wants to merge 1 commit into
mainfrom
fix-docker-status
Open

fix:check docker daemon running?#2286
jokestax wants to merge 1 commit into
mainfrom
fix-docker-status

Conversation

@jokestax

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

Comment thread cmd/akamai/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

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 😆

Comment thread cmd/aws/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrap error

Comment thread cmd/civo/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrap error

Comment thread cmd/google/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrap error

Comment thread cmd/k3d/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrap error

Comment thread cmd/k3s/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrap error

Comment thread cmd/vultr/create.go
err = docker.Checkstatus()
if err != nil {
log.Info().Msgf("%s", err)
return err

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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