{"id":"2d75f7295fab9bed","repo":"docker/cli","slug":"volume-options-are-incompatible-with-type-npipe","errorCode":null,"errorMessage":"volume options are incompatible with type npipe","messagePattern":"volume options are incompatible with type npipe","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/volume.go","lineNumber":179,"sourceCode":"\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}\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,","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/volume.go#L161-L197","documentation":"Raised by handleNpipeToMount when a `type: npipe` volume carries a `volume:` options block. Named-volume options (nocopy, subpath) don't apply to named-pipe mounts; note npipe mounts do accept a `bind:` block for propagation, but not volume options.","triggerScenarios":"ServiceVolumeConfig with Type npipe and Volume != nil, e.g. `type: npipe` plus `volume: {nocopy: true}`, during `docker stack deploy`.","commonSituations":"Windows stack files adapted from named-volume entries without removing the `volume:` block; generators emitting volume options unconditionally.","solutions":["Remove the `volume:` block from the npipe entry","If named-volume behavior was intended, use `type: volume` instead of npipe"],"exampleFix":"# before\nvolumes:\n  - type: npipe\n    source: \\\\.\\pipe\\docker_engine\n    target: \\\\.\\pipe\\docker_engine\n    volume:\n      nocopy: true\n# after\nvolumes:\n  - type: npipe\n    source: \\\\.\\pipe\\docker_engine\n    target: \\\\.\\pipe\\docker_engine","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["docker","compose","stack-deploy","npipe","windows","config-validation"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}