docker/cli ยท error
cluster options are incompatible with type tmpfs
Error message
cluster options are incompatible with type tmpfs
What it means
Raised by handleTmpfsToMount when a `type: tmpfs` volume carries a `cluster:` options block. Cluster options belong to Swarm CSI cluster volumes; a tmpfs mount is node-local and in-memory, so the combination is rejected.
Source
Thrown at cli/compose/convert/volume.go:162
}
func handleTmpfsToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, error) {
result := createMountFromVolume(volume)
if volume.Source != "" {
return mount.Mount{}, errors.New("invalid tmpfs source, source must be empty")
}
if volume.Bind != nil {
return mount.Mount{}, errors.New("bind options are incompatible with type tmpfs")
}
if volume.Volume != nil {
return mount.Mount{}, errors.New("volume options are incompatible with type tmpfs")
}
if volume.Image != nil {
return mount.Mount{}, errors.New("image options are incompatible with type tmpfs")
}
if volume.Cluster != nil {
return mount.Mount{}, errors.New("cluster options are incompatible with type tmpfs")
}
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")
}View on GitHub (pinned to e9452d6e78)
Solutions
- Remove the `cluster:` block from the tmpfs entry
- If a cluster (CSI) volume was intended, use `type: cluster` and remove tmpfs-specific fields
Example fix
# before
volumes:
- type: tmpfs
target: /cache
cluster: {}
# after
volumes:
- type: tmpfs
target: /cache When it happens
Trigger: ServiceVolumeConfig with Type tmpfs and Cluster != nil during `docker stack deploy` conversion.
Common situations: Mixing CSI volume config into a tmpfs entry via copy-paste or YAML merge keys in Swarm stack files.
Related errors
- cluster 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@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/335e54356fe05a2e.json.
Report an issue: GitHub.