{"id":"335e54356fe05a2e","repo":"docker/cli","slug":"cluster-options-are-incompatible-with-type-tmpfs","errorCode":null,"errorMessage":"cluster options are incompatible with type tmpfs","messagePattern":"cluster options are incompatible with type tmpfs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/volume.go","lineNumber":162,"sourceCode":"}\n\nfunc handleTmpfsToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, error) {\n\tresult := createMountFromVolume(volume)\n\n\tif volume.Source != \"\" {\n\t\treturn mount.Mount{}, errors.New(\"invalid tmpfs source, source must be empty\")\n\t}\n\tif volume.Bind != nil {\n\t\treturn mount.Mount{}, errors.New(\"bind options are incompatible with type tmpfs\")\n\t}\n\tif volume.Volume != nil {\n\t\treturn mount.Mount{}, errors.New(\"volume options are incompatible with type tmpfs\")\n\t}\n\tif volume.Image != nil {\n\t\treturn mount.Mount{}, errors.New(\"image options are incompatible with type tmpfs\")\n\t}\n\tif volume.Cluster != nil {\n\t\treturn mount.Mount{}, errors.New(\"cluster options are incompatible with type tmpfs\")\n\t}\n\tif volume.Tmpfs != nil {\n\t\tresult.TmpfsOptions = &mount.TmpfsOptions{\n\t\t\tSizeBytes: volume.Tmpfs.Size,\n\t\t}\n\t}\n\treturn result, nil\n}\n\nfunc handleNpipeToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, error) {\n\tresult := createMountFromVolume(volume)\n\n\tif volume.Source == \"\" {\n\t\treturn mount.Mount{}, errors.New(\"invalid npipe source, source cannot be empty\")\n\t}\n\tif volume.Volume != nil {\n\t\treturn mount.Mount{}, errors.New(\"volume options are incompatible with type npipe\")\n\t}","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/volume.go#L144-L180","documentation":"Raised by handleTmpfsToMount when a `type: tmpfs` volume carries a `cluster:` options block. Cluster options belong to Swarm CSI cluster volumes; a tmpfs mount is node-local and in-memory, so the combination is rejected.","triggerScenarios":"ServiceVolumeConfig with Type tmpfs and Cluster != nil during `docker stack deploy` conversion.","commonSituations":"Mixing CSI volume config into a tmpfs entry via copy-paste or YAML merge keys in Swarm stack files.","solutions":["Remove the `cluster:` block from the tmpfs entry","If a cluster (CSI) volume was intended, use `type: cluster` and remove tmpfs-specific fields"],"exampleFix":"# before\nvolumes:\n  - type: tmpfs\n    target: /cache\n    cluster: {}\n# after\nvolumes:\n  - type: tmpfs\n    target: /cache","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["docker","compose","stack-deploy","tmpfs","swarm","config-validation"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}