{"id":"0d2f1009e80989b3","repo":"docker/cli","slug":"volume-options-are-incompatible-with-type-cluster","errorCode":null,"errorMessage":"volume options are incompatible with type cluster","messagePattern":"volume options are incompatible with type cluster","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/volume.go","lineNumber":210,"sourceCode":"\treturn result, nil\n}\n\nfunc handleClusterToMount(\n\tvolume composetypes.ServiceVolumeConfig,\n\tstackVolumes volumes,\n\tnamespace Namespace,\n) (mount.Mount, error) {\n\tif volume.Source == \"\" {\n\t\treturn mount.Mount{}, errors.New(\"invalid cluster source, source cannot be empty\")\n\t}\n\tif volume.Tmpfs != nil {\n\t\treturn mount.Mount{}, errors.New(\"tmpfs options are incompatible with type cluster\")\n\t}\n\tif volume.Bind != nil {\n\t\treturn mount.Mount{}, errors.New(\"bind options are incompatible with type cluster\")\n\t}\n\tif volume.Volume != nil {\n\t\treturn mount.Mount{}, errors.New(\"volume options are incompatible with type cluster\")\n\t}\n\n\tresult := createMountFromVolume(volume)\n\tresult.ClusterOptions = &mount.ClusterOptions{}\n\n\tif !strings.HasPrefix(volume.Source, \"group:\") {\n\t\t// if the volume is a cluster volume and the source is a volumegroup, we\n\t\t// will ignore checking to see if such a volume is defined. the volume\n\t\t// group isn't namespaced, and there's no simple way to indicate that\n\t\t// external volumes with a given group exist.\n\t\tstackVolume, exists := stackVolumes[volume.Source]\n\t\tif !exists {\n\t\t\treturn mount.Mount{}, fmt.Errorf(\"undefined volume %q\", volume.Source)\n\t\t}\n\n\t\t// if the volume is not specified with a group source, we may namespace\n\t\t// the name, if one is not otherwise specified.\n\t\tif stackVolume.Name != \"\" {","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/volume.go#L192-L228","documentation":"Error \"volume options are incompatible with type cluster\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/convert/volume.go:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}