docker/cli ยท error
image options are incompatible with type npipe
Error message
image options are incompatible with type npipe
What it means
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.
Source
Thrown at cli/compose/convert/volume.go:182
if volume.Tmpfs != nil {
result.TmpfsOptions = &mount.TmpfsOptions{
SizeBytes: volume.Tmpfs.Size,
}
}
return result, nil
}
func handleNpipeToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, error) {
result := createMountFromVolume(volume)
if volume.Source == "" {
return mount.Mount{}, errors.New("invalid npipe source, source cannot be empty")
}
if volume.Volume != nil {
return mount.Mount{}, errors.New("volume options are incompatible with type npipe")
}
if volume.Image != nil {
return mount.Mount{}, errors.New("image options are incompatible with type npipe")
}
if volume.Tmpfs != nil {
return mount.Mount{}, errors.New("tmpfs options are incompatible with type npipe")
}
if volume.Bind != nil {
result.BindOptions = &mount.BindOptions{
Propagation: mount.Propagation(volume.Bind.Propagation),
}
}
return result, nil
}
func handleClusterToMount(
volume composetypes.ServiceVolumeConfig,
stackVolumes volumes,
namespace Namespace,
) (mount.Mount, error) {
if volume.Source == "" {View on GitHub (pinned to e9452d6e78)
Solutions
- Remove the `image:` block from the npipe entry
- If image-content mounting was intended, use `type: image` with the image reference as `source:`
Example fix
# before
volumes:
- type: npipe
source: \\.\pipe\docker_engine
target: \\.\pipe\docker_engine
image:
subpath: data
# after
volumes:
- type: npipe
source: \\.\pipe\docker_engine
target: \\.\pipe\docker_engine When it happens
Trigger: ServiceVolumeConfig with Type npipe and Image != nil, e.g. `type: npipe` plus `image: {subpath: dir}`, during `docker stack deploy`.
Common situations: Copy-paste from an image-mount entry into a Windows npipe entry; YAML anchors merging image options into unrelated volumes.
Related errors
- invalid npipe source, source cannot be empty
- volume options are incompatible with type npipe
- image options are incompatible with type tmpfs
- invalid image source, source cannot be empty
- volume options are incompatible with type image
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/ad0b260f3c533db8.json.
Report an issue: GitHub.