

I think if the source path doesn’t exist, docker will mount a directory ( IIRC, but not 100% sure ).
Can you triple check if the path to your wg0.conf file on your host actually exists and that the path is definitely correct?
stat /home/docker/test/Wireguard/wg0.conf







I have no clue as I’ve not set this up myself unfortunately. :(
There are also certain Linux distros have SElinux enabled ( like red hat or fedora ). This could also block docker from accessing the file if it is enabled.
You’d have to search online how to set a policy in selinux to allow it.
SElinux does not appear in Ubuntu/Debian based distros.
Easiest check would be to run
getenforce. If it works and it returns1it’s enabled and possibly the culprit. You can try running your docker after runningsetenforce 0. This will temporarily disable it until a restart IIRC. You can enable it again by setting it to 1.I wouldn’t recommend disablint it permanently