docker/cli · error
tmpfs options are incompatible with type npipe
Error message
tmpfs options are incompatible with type npipe
What it means
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.)
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).
Example fix
# before
volumes:
- type: npipe
source: \\.\\pipe\\engine
target: \\.\\pipe\\engine
tmpfs:
size: 67108864
# after
volumes:
- type: npipe
source: \\.\\pipe\\engine
target: \\.\\pipe\\engine Defensive patterns
Strategy: validation
Validate before calling
for i, v := range serviceVolumes {
if v.Type == "npipe" && v.Tmpfs != nil {
return fmt.Errorf("service volume[%d] target=%q: type npipe must not declare a tmpfs block", i, v.Target)
}
} Try / catch
mounts, err := convert.Volumes(serviceVolumes, stackVolumes, namespace)
if err != nil && strings.Contains(err.Error(), "tmpfs options are incompatible with type npipe") {
return fmt.Errorf("compose config error: %w (remove the tmpfs: block from the npipe entry)", err)
} Prevention
- Do not carry a tmpfs block onto an npipe entry; the two are unrelated.
- Keep option blocks aligned with the volume's declared type.
When it happens
Trigger: ServiceVolumeConfig with Type=="npipe" and Tmpfs!=nil passed to convertVolumeToMount().
Common situations: Switching a tmpfs entry to npipe and leaving `tmpfs: { size: ... }` behind; YAML merge bringing in tmpfs options.
Related errors
- tmpfs options are incompatible with type bind
- invalid tmpfs source, source must be empty
- bind options are incompatible with type tmpfs
- volume options are incompatible with type tmpfs
- image options are incompatible with type tmpfs
AI-assisted analysis of docker/cli@4f84911bfe (2026-08-07).
Data as JSON: /api/errors/69d8b4a95d174e65.
Report an issue: GitHub.
Appendix: source
Thrown at cli/compose/convert/volume.go:185
}
}
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 == "" {
return mount.Mount{}, errors.New("invalid cluster source, source cannot be empty")
}
if volume.Tmpfs != nil {View on GitHub (pinned to 4f84911bfe)