This project provides a simple way to run an OpenVPN client in a Docker container.
To build the Docker image, run the following command in the root of the project:
docker build -t openvpn-client .
To run the container, you need to provide an OpenVPN configuration file (.ovpn). You can do this by mounting a directory containing your .ovpn file to /etc/openvpn in the container.
You also need to run the container with the NET_ADMIN capability to allow it to modify network interfaces.
Here is an example docker run command:
docker run --rm -it \
--cap-add=NET_ADMIN \
-v /path/to/your/ovpn/files:/etc/openvpn \
openvpn-client
Replace /path/to/your/ovpn/files with the absolute path to the directory containing your .ovpn file.
The container will automatically find the first .ovpn file in the mounted directory and use it to start the OpenVPN connection.
Content type
Image
Digest
sha256:489d3ea62…
Size
5.3 MB
Last updated
about 12 hours ago
docker pull ricariel/openvpn