{"id":"ad0b260f3c533db8","repo":"docker/cli","slug":"image-options-are-incompatible-with-type-npipe","errorCode":null,"errorMessage":"image options are incompatible with type npipe","messagePattern":"image options are incompatible with type npipe","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/volume.go","lineNumber":182,"sourceCode":"\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,\n\tnamespace Namespace,\n) (mount.Mount, error) {\n\tif volume.Source == \"\" {","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/volume.go#L164-L200","documentation":"Raised by handleNpipeToMount when a `type: npipe` volume carries an `image:` options block. Image mount options only make sense when mounting an OCI image's filesystem, not when forwarding a Windows named pipe, so the converter rejects the combination.","triggerScenarios":"ServiceVolumeConfig with Type npipe and Image != nil, e.g. `type: npipe` plus `image: {subpath: dir}`, during `docker stack deploy`.","commonSituations":"Copy-paste from an image-mount entry into a Windows npipe entry; YAML anchors merging image options into unrelated volumes.","solutions":["Remove the `image:` block from the npipe entry","If image-content mounting was intended, use `type: image` with the image reference as `source:`"],"exampleFix":"# before\nvolumes:\n  - type: npipe\n    source: \\\\.\\pipe\\docker_engine\n    target: \\\\.\\pipe\\docker_engine\n    image:\n      subpath: data\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","image-mount","windows","config-validation"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}