docker/cli ยท error

bind options are incompatible with type cluster

Error message

bind options are incompatible with type cluster

What it means

Error "bind options are incompatible with type cluster" thrown in docker/cli.

Source

Thrown at cli/compose/convert/volume.go:207

			Propagation: mount.Propagation(volume.Bind.Propagation),
		}
	}
	return result, nil
}

func handleClusterToMount(
	volume composetypes.ServiceVolumeConfig,
	stackVolumes volumes,
	namespace Namespace,
) (mount.Mount, error) {
	if volume.Source == "" {
		return mount.Mount{}, errors.New("invalid cluster source, source cannot be empty")
	}
	if volume.Tmpfs != nil {
		return mount.Mount{}, errors.New("tmpfs options are incompatible with type cluster")
	}
	if volume.Bind != nil {
		return mount.Mount{}, errors.New("bind options are incompatible with type cluster")
	}
	if volume.Volume != nil {
		return mount.Mount{}, errors.New("volume options are incompatible with type cluster")
	}

	result := createMountFromVolume(volume)
	result.ClusterOptions = &mount.ClusterOptions{}

	if !strings.HasPrefix(volume.Source, "group:") {
		// if the volume is a cluster volume and the source is a volumegroup, we
		// will ignore checking to see if such a volume is defined. the volume
		// group isn't namespaced, and there's no simple way to indicate that
		// external volumes with a given group exist.
		stackVolume, exists := stackVolumes[volume.Source]
		if !exists {
			return mount.Mount{}, fmt.Errorf("undefined volume %q", volume.Source)
		}

View on GitHub (pinned to e9452d6e78)

When it happens

Trigger: Thrown at cli/compose/convert/volume.go:207 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01). Data as JSON: /data/errors/d290e8c5cf914390.json. Report an issue: GitHub.