Closed kramrm closed 6 months ago
Had the same issue! I used the following docker command to map the dir /etc/wireguard to /wireguard before I gave it Recursive 777 rights!
chmod -R 7777 /etc/wireguard/
To give the dir all permissions
docker run -d --net=host --cap-add=NET_ADMIN --name wgexporter --restart unless-stopped -v /etc/wireguard:/wireguard:ro mindflavor/prometheus-wireguard-exporter -a true -n /wireguard/wg0.conf`
Then to start the image!!
Worked for me!
Since Docker runs in a separate environment, I can't reference the wg0.conf file from the host system, and if I map the file as a pass through volume mount, I get a permission issue accessing the config file. How would I pass this in so I can get friendly names while running as a container?