docker openvpn code example
Example 1: docker openvpn
openvpn:
image: "kylemanna/openvpn:latest"
container_name: openvpn
ports:
- "1194:1194/udp"
volumes:
- "~/openvpn/data:/etc/openvpn"
cap_add:
- NET_ADMIN
restart: always
Example 2: docker openvpn
docker run -v ~/openvpn/data:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_genconfig -u udp://vpn.nom_de_domaine.com
Example 3: docker openvpn
docker run -v ~/openvpn/data:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa build-client-full nom_client
Example 4: docker openvpn
docker-compose up -d
Example 5: docker openvpn
docker run -v ~/openvpn/data:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
Example 6: docker openvpn
docker run -v ~/openvpn/data:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn ovpn_initpki
Example 7: docker openvpn
mkdir -p ~/openvpn/data