From 035ff64200344bb2e9146f1abedaf670ac593b9d Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Wed, 4 Jun 2014 10:52:59 -0700 Subject: [PATCH] Dockerfile: Add ENV configuration * Add ENV configuration options to Dockerfile as opposed to keeping in the wrapper script. * First step to splitting up openvpn.sh in to smaller scripts. --- Dockerfile | 6 ++++++ bin/openvpn.sh | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) 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() {