{"id":"a08a752ff55e1cc3","repo":"docker/cli","slug":"bind-options-are-incompatible-with-type-tmpfs","errorCode":null,"errorMessage":"bind options are incompatible with type tmpfs","messagePattern":"bind options are incompatible with type tmpfs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/volume.go","lineNumber":153,"sourceCode":"\tif volume.Cluster != nil {\n\t\treturn mount.Mount{}, errors.New(\"cluster options are incompatible with type bind\")\n\t}\n\tif volume.Bind != nil {\n\t\tresult.BindOptions = &mount.BindOptions{\n\t\t\tPropagation: mount.Propagation(volume.Bind.Propagation),\n\t\t}\n\t}\n\treturn result, nil\n}\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","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/volume.go#L135-L171","documentation":"Raised by handleTmpfsToMount when a `type: tmpfs` volume also carries a `bind:` options block (e.g. propagation). Bind propagation settings only apply to bind mounts, so the converter rejects the mismatched block rather than ignoring it.","triggerScenarios":"ServiceVolumeConfig with Type tmpfs and Bind != nil, e.g. compose YAML with `type: tmpfs` plus `bind: {propagation: shared}`, during `docker stack deploy` conversion.","commonSituations":"Retyping a bind mount to tmpfs without removing its `bind:` block; YAML anchor reuse copying bind options across entries.","solutions":["Remove the `bind:` block from the tmpfs volume entry","If propagation is genuinely needed, keep the mount as `type: bind` with a valid `source:`"],"exampleFix":"# before\nvolumes:\n  - type: tmpfs\n    target: /cache\n    bind:\n      propagation: shared\n# after\nvolumes:\n  - type: tmpfs\n    target: /cache","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["docker","compose","stack-deploy","tmpfs","bind-mount","config-validation"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}