diff --git a/pkg/server/registry/service.go b/pkg/server/registry/service.go index 09322f8203..a2ee5083f4 100644 --- a/pkg/server/registry/service.go +++ b/pkg/server/registry/service.go @@ -8,6 +8,7 @@ import ( "fmt" "net" "os" + "os/exec" "github.com/daytonaio/daytona/pkg/docker" "github.com/docker/docker/api/types/container" @@ -53,6 +54,14 @@ func (s *LocalContainerRegistry) Start() error { return err } + if _, err := exec.LookPath("docker"); err != nil { + return fmt.Errorf("cannot find Docker installation. Please install by following https://docs.docker.com/engine/install/ and try again") + } + + if _, err := cli.Info(ctx); err != nil { + return fmt.Errorf("cannot connect to the Docker daemon. Is the Docker daemon running?") + } + dockerClient := docker.NewDockerClient(docker.DockerClientConfig{ ApiClient: cli, })