{"record":{"id":"69d8b4a95d174e65","repo":"docker/cli","slug":"tmpfs-options-are-incompatible-with-type-npipe","errorCode":null,"errorMessage":"tmpfs options are incompatible with type npipe","messagePattern":"tmpfs options are incompatible with type npipe","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/volume.go","lineNumber":185,"sourceCode":"\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}\n\tif volume.Image != nil {\n\t\treturn mount.Mount{}, errors.New(\"image options are incompatible with type npipe\")\n\t}\n\tif volume.Tmpfs != nil {\n\t\treturn mount.Mount{}, errors.New(\"tmpfs options are incompatible with type npipe\")\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 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 {","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/compose/convert/volume.go#L167-L203","documentation":"Returned by handleNpipeToMount (cli/compose/convert/volume.go:184-185). tmpfs options (size) describe an in-memory filesystem and are meaningless for a named-pipe forward, so the converter rejects a `tmpfs:` block on an npipe entry. (A `bind:` block is allowed on npipe; tmpfs is not.)","triggerScenarios":"ServiceVolumeConfig with Type==\"npipe\" and Tmpfs!=nil passed to convertVolumeToMount().","commonSituations":"Switching a tmpfs entry to npipe and leaving `tmpfs: { size: ... }` behind; YAML merge bringing in tmpfs options.","solutions":["Remove the `tmpfs:` options block from the npipe entry.","If a size-capped in-memory filesystem was intended, change `type:` to `tmpfs` (no source)."],"exampleFix":"# before\nvolumes:\n  - type: npipe\n    source: \\\\.\\\\pipe\\\\engine\n    target: \\\\.\\\\pipe\\\\engine\n    tmpfs:\n      size: 67108864\n\n# after\nvolumes:\n  - type: npipe\n    source: \\\\.\\\\pipe\\\\engine\n    target: \\\\.\\\\pipe\\\\engine","handlingStrategy":"validation","validationCode":"for i, v := range serviceVolumes {\n    if v.Type == \"npipe\" && v.Tmpfs != nil {\n        return fmt.Errorf(\"service volume[%d] target=%q: type npipe must not declare a tmpfs block\", i, v.Target)\n    }\n}","typeGuard":null,"tryCatchPattern":"mounts, err := convert.Volumes(serviceVolumes, stackVolumes, namespace)\nif err != nil && strings.Contains(err.Error(), \"tmpfs options are incompatible with type npipe\") {\n    return fmt.Errorf(\"compose config error: %w (remove the tmpfs: block from the npipe entry)\", err)\n}","preventionTips":["Do not carry a tmpfs block onto an npipe entry; the two are unrelated.","Keep option blocks aligned with the volume's declared type."],"tags":["docker","compose","volumes","npipe","tmpfs","config-validation"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}