{"record":{"id":"3ab98d4fa9acc22a","repo":"GoogleContainerTools/skaffold","slug":"creating-container-in-local-docker-3ab98d","errorCode":null,"errorMessage":"creating container in local docker","messagePattern":"creating container in local docker","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/verify/docker/verify.go","lineNumber":260,"sourceCode":"\topts.Bindings = bindings\n\t// verify waits for run to complete\n\topts.Wait = true\n\t// adding in env vars from verify container schema field\n\tenvVars := []string{}\n\tfor _, env := range tc.Container.Env {\n\t\tenvVars = append(envVars, env.Name+\"=\"+env.Value)\n\t}\n\t// adding in env vars parsed from --verify-env-file flag\n\tfor k, v := range v.envMap {\n\t\tenvVars = append(envVars, k+\"=\"+v)\n\t}\n\topts.ContainerConfig.Env = envVars\n\n\teventV2.VerifyInProgress(opts.VerifyTestName)\n\tstatusCh, errCh, id, err := v.client.Run(ctx, out, opts)\n\tif err != nil {\n\t\teventV2.VerifyFailed(tc.Name, err)\n\t\treturn errors.Wrap(err, \"creating container in local docker\")\n\t}\n\tv.TrackContainerFromBuild(graph.Artifact{\n\t\tImageName: opts.VerifyTestName,\n\t\tTag:       opts.VerifyTestName,\n\t}, tracker.Container{Name: containerName, ID: id})\n\n\tvar timeoutDuration *time.Duration = nil\n\tif tc.Config.Timeout != nil {\n\t\ttimeoutDuration = util.Ptr(time.Second * time.Duration(*tc.Config.Timeout))\n\t}\n\n\tvar containerErr error\n\tselect {\n\tcase err := <-errCh:\n\t\tif err != nil {\n\t\t\tcontainerErr = err\n\t\t}\n\tcase status := <-statusCh:","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/verify/docker/verify.go#L242-L278","documentation":"The docker verify runner failed to create/start the verification container via the local Docker daemon (client.Run). The error wraps the underlying docker API error, reported while running a verify test case locally.","triggerScenarios":"createAndRunContainer calls v.client.Run(ctx, out, opts) and the docker daemon rejects container creation — bad image, missing image locally, invalid env/port/network opts, daemon down.","commonSituations":"Verify image not built or not tagged correctly; Docker Desktop not running; unsupported verify container options; network referenced by verify not present; insufficient disk space.","solutions":["Check the wrapped docker error for the root cause (image not found, daemon unreachable, etc.)","Confirm Docker is running (`docker ps`) and the verify image exists locally (`docker images`)","Ensure the verify test's image is built and its tag matches opts.VerifyTestName","Check container config: env vars, ports, network name passed in opts"],"exampleFix":"// before: verify against an image never built\nverify:\n  - name: test\n    container:\n      image: missing-image\n// after: add it to build.artifacts first\nbuild:\n  artifacts:\n    - image: missing-image","handlingStrategy":"validation","validationCode":"// Before verify: docker daemon up and image present\nif _, err := exec.LookPath(\"docker\"); err != nil { return errors.New(\"docker not installed\") }\nif err := exec.Command(\"docker\", \"image\", \"inspect\", verifyImage).Run(); err != nil {\n    return fmt.Errorf(\"verify image %s not built locally\", verifyImage)\n}","typeGuard":null,"tryCatchPattern":"if err := verifier.Verify(ctx, out, tc); err != nil {\n    if strings.Contains(err.Error(), \"creating container in local docker\") {\n        return fmt.Errorf(\"docker verify could not start container: %w\", err)\n    }\n    return err\n}","preventionTips":["Start Docker Desktop/daemon before running `skaffold verify`","Ensure every verify test's container image is built and tagged correctly","Keep disk space available; docker fails to create containers when full"],"tags":["docker","verify","container-creation"],"backgroundTag":"docker-container-start-failed","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"}