From 654ded0f104d424b9bad6dd2c8137f4d89d0f1ef Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Wed, 16 Dec 2015 13:28:20 +0100 Subject: [PATCH] added openvpn --- .dockerfunc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.dockerfunc b/.dockerfunc index 9c32e55..eb2014a 100644 --- a/.dockerfunc +++ b/.dockerfunc @@ -122,7 +122,7 @@ latex() { fschl/latex "$@" } -libreoffice(){ +libreoffice() { del_stopped libreoffice docker run -d \ @@ -136,6 +136,21 @@ libreoffice(){ fschl/libreoffice } +# start from a directory which contains a openvpn config file named 'config.ovpn' +# cert and key files should be in the same directory or relatively referencable +# from the config file +openvpn() { + del_stopped openvpn + + docker run -it --rm \ + --net host \ + --device /dev/net/tun:/dev/net/tun \ + --cap-add NET_ADMIN \ + -v "$PWD":/etc/openvpn \ + fschl/openvpn:latest config.ovpn +} + + pulseaudio() { del_stopped pulseaudio