GoogleContainerTools/skaffold · error

creating skaffold network %s: %w

Error message

creating skaffold network %s: %w

What it means

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.

Source

Thrown at pkg/skaffold/verify/docker/verify.go:128

}

// TrackContainerFromBuild adds an artifact and its newly-associated container
// to the container tracker.
func (v *Verifier) TrackContainerFromBuild(artifact graph.Artifact, container tracker.Container) {
	v.tracker.Add(artifact, container)
}

// Verify executes specified artifacts by creating containers in the local docker daemon
// from each specified image, executing them, and waiting for execution to complete.
func (v *Verifier) Verify(ctx context.Context, out io.Writer, allbuilds []graph.Artifact) error {
	var err error

	if !v.networkFlagPassed {
		v.once.Do(func() {
			err = v.client.NetworkCreate(ctx, v.network, nil)
		})
		if err != nil {
			return fmt.Errorf("creating skaffold network %s: %w", v.network, err)
		}
	}

	builds := []graph.Artifact{}
	const maxWorkers = math.MaxInt64
	s := semgroup.NewGroup(context.Background(), maxWorkers)

	for _, tc := range v.cfg {
		var na graph.Artifact
		foundArtifact := false
		testCase := tc
		useLocalImages := testCase.ExecutionMode.LocalExecutionMode.UseLocalImages

		for _, b := range allbuilds {
			if tc.Container.Image == b.ImageName {
				foundArtifact = true
				imageID, err := v.client.ImageID(ctx, b.Tag)
				if err != nil {

View on GitHub (pinned to a1189de023)

Solutions

  1. Verify the daemon is reachable: `docker info` (start Docker Desktop / fix DOCKER_HOST).
  2. Remove a conflicting leftover network: `docker network rm <network>` (or `docker network prune`).
  3. Pass an explicit pre-created network via the network flag so the auto-create path is skipped entirely.
  4. Use a simpler/valid network name (alphanumeric, no templating artifacts) if the name is malformed.

Example fix

# before
$ skaffold verify   # daemon down -> NetworkCreate fails
// after
$ docker info            # confirm daemon up
$ docker network rm skaffold-network 2>/dev/null || true
$ skaffold verify --network skaffold-network
Defensive patterns

Strategy: retry

Validate before calling

// pre-flight before skaffold verify
if _, err := exec.Command("docker", "info").Run(); err != nil {
    return fmt.Errorf("docker daemon unreachable: %w", err)
}
net := "skaffold-network"
if out, err := exec.Command("docker", "network", "inspect", net).Output(); err == nil {
    exec.Command("docker", "network", "rm", net).Run() // clear stale network
}

Try / catch

err := verifier.Verify(ctx, out, useLocalImages)
if err != nil && strings.Contains(err.Error(), "creating skaffold network") {
    // recreate daemon-facing state once, then retry
    exec.Command("docker", "network", "prune", "-f").Run()
    err = verifier.Verify(ctx, out, useLocalImages)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/7440a82a2ad38b0e. Report an issue: GitHub.