• 0 Posts
  • 1 Comment
Joined 1Y ago
cake
Cake day: Aug 04, 2023

help-circle
rss

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:

volumes:
      - wireguard-server-config:/config
      - wireguard-modules:/lib/modules

ref: https://docs.docker.com/engine/storage/volumes/#use-a-volume-with-docker-compose