The compose specification says:
To reuse a volume across multiple services, a named volume MUST be declared in the top-level
volumes
key.
I am currently trying to debug an application with a docker bind mount issue. I noticed that the compose.yaml file for this application declares the volume ${EXTRA_VOLUME}
under every service.
Every other reused volume is (1) declared under the services that use it and (2) declared under the top level volumes
key. Therefore, the other volumes are compliant with the specification.
The ${EXTRA_VOLUME}
is (1) declared under the services that use it, but NOT declared under the top level volumes
key.
So, I am wondering: What happens to ${EXTRA_VOLUME}
? What problems should I expect?