{"record":{"id":"34bef7f8ab899ee6","repo":"GoogleContainerTools/skaffold","slug":"could-not-connect-to-local-docker-daemon-w","errorCode":null,"errorMessage":"could not connect to local docker daemon: %w","messagePattern":"could not connect to local docker daemon: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/debug/apply_transforms.go","lineNumber":62,"sourceCode":"\t}\n\tfor _, artifact := range builds {\n\t\tif image == artifact.ImageName || image == artifact.Tag {\n\t\t\tlog.Entry(context.TODO()).Debugf(\"Found artifact for image %q\", image)\n\t\t\treturn &artifact\n\t\t}\n\t}\n\treturn nil\n}\n\n// RetrieveImageConfiguration retrieves the image container configuration for\n// the given build artifact\nfunc RetrieveImageConfiguration(ctx context.Context, artifact *graph.Artifact, insecureRegistries map[string]bool) (ImageConfiguration, error) {\n\t// TODO: use the proper RunContext\n\tapiClient, err := docker.NewAPIClient(ctx, &runcontext.RunContext{\n\t\tInsecureRegistries: insecureRegistries,\n\t})\n\tif err != nil {\n\t\treturn ImageConfiguration{}, fmt.Errorf(\"could not connect to local docker daemon: %w\", err)\n\t}\n\n\t// the apiClient will go to the remote registry if local docker daemon is not available\n\tmanifest, err := apiClient.ConfigFile(ctx, artifact.Tag)\n\tif err != nil {\n\t\tlog.Entry(ctx).Debugf(\"Error retrieving image manifest for %v: %v\", artifact.Tag, err)\n\t\treturn ImageConfiguration{}, fmt.Errorf(\"retrieving image config for %q: %w\", artifact.Tag, err)\n\t}\n\n\tconfig := manifest.Config\n\tlog.Entry(ctx).Debugf(\"Retrieved local image configuration for %v: %v\", artifact.Tag, config)\n\t// need to duplicate slices as apiClient caches requests\n\treturn ImageConfiguration{\n\t\tArtifact:    artifact.ImageName,\n\t\tRuntimeType: types.ToRuntime(artifact.RuntimeType),\n\t\tAuthor:      manifest.Author,\n\t\tEnv:         envAsMap(config.Env),\n\t\tEntrypoint:  dupArray(config.Entrypoint),","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/debug/apply_transforms.go#L44-L80","documentation":"Fires in RetrieveImageConfiguration when a Docker API client cannot be created to inspect the artifact's image. The local docker daemon is unreachable (daemon not running, wrong DOCKER_HOST/socket permissions) — needed because image config may be resolved from the local daemon before falling back to a remote registry.","triggerScenarios":"Thrown at pkg/skaffold/debug/apply_transforms.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start the Docker daemon (e.g. `systemctl start docker` or open Docker Desktop)","Verify DOCKER_HOST points to a reachable daemon and the socket is accessible (`docker ps`)","Fix socket permissions or group membership if access is denied"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}