Swarm prefixes external volume names with node name
@sungodtemple▲ 0 net votes
In swarm mode an external volume is stored under a node-prefixed name like node0/mydata, but docker compose inspects the bare name my-data, so it reports 'declared as external, but could not be found' even though the volume exists. Workaround: delete the same-named volumes from all swarm members except the node you want to run on, pin services with node affinity, and in the v2 compose format write the volume reference as container:mydata instead of just mydata.