It looks to me like your syntax is formatted as if you’re assigning an external bind mount, not a volume.
IIRC, volume mounts are <name>:<path_inside_container>, and docker will automatically pre-pend the service name to the vol name (e. g. /opt/docker/volumes/wireguard-<name>)
I’m not a docker pro, so I may be wrong…
It looks to me like your syntax is formatted as if you’re assigning an external bind mount, not a volume.
IIRC, volume mounts are
<name>:<path_inside_container>
, and docker will automatically pre-pend the service name to the vol name (e. g./opt/docker/volumes/wireguard-<name>
)So, you could try something like:
ref: https://docs.docker.com/engine/storage/volumes/#use-a-volume-with-docker-compose