{"record":{"id":"7440a82a2ad38b0e","repo":"GoogleContainerTools/skaffold","slug":"creating-skaffold-network-s-w-7440a8","errorCode":null,"errorMessage":"creating skaffold network %s: %w","messagePattern":"creating skaffold network (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/verify/docker/verify.go","lineNumber":128,"sourceCode":"}\n\n// TrackContainerFromBuild adds an artifact and its newly-associated container\n// to the container tracker.\nfunc (v *Verifier) TrackContainerFromBuild(artifact graph.Artifact, container tracker.Container) {\n\tv.tracker.Add(artifact, container)\n}\n\n// Verify executes specified artifacts by creating containers in the local docker daemon\n// from each specified image, executing them, and waiting for execution to complete.\nfunc (v *Verifier) Verify(ctx context.Context, out io.Writer, allbuilds []graph.Artifact) error {\n\tvar err error\n\n\tif !v.networkFlagPassed {\n\t\tv.once.Do(func() {\n\t\t\terr = v.client.NetworkCreate(ctx, v.network, nil)\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating skaffold network %s: %w\", v.network, err)\n\t\t}\n\t}\n\n\tbuilds := []graph.Artifact{}\n\tconst maxWorkers = math.MaxInt64\n\ts := semgroup.NewGroup(context.Background(), maxWorkers)\n\n\tfor _, tc := range v.cfg {\n\t\tvar na graph.Artifact\n\t\tfoundArtifact := false\n\t\ttestCase := tc\n\t\tuseLocalImages := testCase.ExecutionMode.LocalExecutionMode.UseLocalImages\n\n\t\tfor _, b := range allbuilds {\n\t\t\tif tc.Container.Image == b.ImageName {\n\t\t\t\tfoundArtifact = true\n\t\t\t\timageID, err := v.client.ImageID(ctx, b.Tag)\n\t\t\t\tif err != nil {","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/verify/docker/verify.go#L110-L146","documentation":"The docker verifier lazily creates an isolated Docker network (v.network) via sync.Once when the user did not pass an explicit network flag; this error wraps a NetworkCreate failure. Docker refuses or fails the create when the daemon is unreachable, the network name already exists with a conflicting definition, or the name is invalid. The verifier then cannot schedule its test containers on the isolated network.","triggerScenarios":"Running `skaffold verify` with a docker verifier and no network flag, triggering client.NetworkCreate, when the Docker daemon is down/unreachable, the network name is invalid, or the daemon reports the network already exists / pool overlap errors.","commonSituations":"Docker Desktop not running or DOCKER_HOST pointing at an unreachable daemon; a leftover network with the same name from a crashed prior run; name containing invalid characters from templated test names; default address-pool exhaustion on large setups.","solutions":["Verify the daemon is reachable: `docker info` (start Docker Desktop / fix DOCKER_HOST).","Remove a conflicting leftover network: `docker network rm <network>` (or `docker network prune`).","Pass an explicit pre-created network via the network flag so the auto-create path is skipped entirely.","Use a simpler/valid network name (alphanumeric, no templating artifacts) if the name is malformed."],"exampleFix":"# before\n$ skaffold verify   # daemon down -> NetworkCreate fails\n// after\n$ docker info            # confirm daemon up\n$ docker network rm skaffold-network 2>/dev/null || true\n$ skaffold verify --network skaffold-network","handlingStrategy":"retry","validationCode":"// pre-flight before skaffold verify\nif _, err := exec.Command(\"docker\", \"info\").Run(); err != nil {\n    return fmt.Errorf(\"docker daemon unreachable: %w\", err)\n}\nnet := \"skaffold-network\"\nif out, err := exec.Command(\"docker\", \"network\", \"inspect\", net).Output(); err == nil {\n    exec.Command(\"docker\", \"network\", \"rm\", net).Run() // clear stale network\n}","typeGuard":null,"tryCatchPattern":"err := verifier.Verify(ctx, out, useLocalImages)\nif err != nil && strings.Contains(err.Error(), \"creating skaffold network\") {\n    // recreate daemon-facing state once, then retry\n    exec.Command(\"docker\", \"network\", \"prune\", \"-f\").Run()\n    err = verifier.Verify(ctx, out, useLocalImages)\n}","preventionTips":["Confirm `docker info` works in the same shell/CI job before verify.","Prune leftover networks after crashed runs (docker network prune).","Pass an explicit, pre-created network via the network flag to skip auto-creation.","Avoid templated characters that produce invalid network names; watch for address-pool exhaustion on busy daemons."],"tags":["docker","network","verify","daemon"],"backgroundTag":"docker-network-create-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"}