diff --git a/Dockerfile b/Dockerfile index 00fda47..8b62300 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,12 @@ RUN ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin ADD ./bin /usr/local/bin RUN chmod a+x /usr/local/bin/* +# Needed by scripts +ENV OPENVPN /etc/openvpn +ENV EASYRSA /usr/local/share/easy-rsa/easyrsa3 +ENV EASYRSA_PKI $OPENVPN/pki +ENV EASYRSA_VARS_FILE $OPENVPN/vars + VOLUME ["/etc/openvpn"] EXPOSE 1194/udp diff --git a/bin/openvpn.sh b/bin/openvpn.sh index f9b0a29..154d406 100755 --- a/bin/openvpn.sh +++ b/bin/openvpn.sh @@ -3,13 +3,6 @@ # OpenVPN + Docker Wrapper Script # -OPENVPN="/etc/openvpn" - -# Needed by easyrsa itself -export EASYRSA="/usr/local/share/easy-rsa/easyrsa3" -export EASYRSA_PKI="$OPENVPN/pki" -export EASYRSA_VARS_FILE="$OPENVPN/vars" - set -ex abort() {