wfg / docker-openvpn-client

OpenVPN client with killswitch and proxy servers; built on Alpine
MIT License
353 stars 107 forks source link

Cat get the config.ovpn into the container #104

Closed hackschnitzel09 closed 1 year ago

hackschnitzel09 commented 1 year ago

Hey, I can't get the .ovpn file from the host mounted. The mount should target /config right? I alway get the error "erro: no vpn configuration file found".

The mounting works on other containers so it should work the same way in here as well. Thankfull for any ideas. Regards

hackschnitzel09 commented 1 year ago

For everyone with the same issue. Mounting on /data/vpn works

Michoels commented 10 months ago

For future readers, this is the exact command that worked for me.

My config file was /home/azureuser/vpn/client.conf.

Mounting it to /data/vpn would be --volume='/home/azureuser/vpn:/data/vpn', and so the final command was:

docker run -it  --name=openvpn-client  --cap-add=NET_ADMIN  --device=/dev/net/tun  --volume='/home/azureuser/vpn:/data/vpn' ghcr.io/wfg/openvpn-client
Stanislasss commented 8 months ago

I had the same error. And same result, mounting on /data/vpn works. It would be great to have either Readme or the entry.sh updated. My mount option FYI:

--mount type=bind,source=/usr/vpns/openvpn.ovpn,target=/data/vpn/openvpn.ovpn