alpine: Use easy-rsa in testing branch of alpine

* Simplifes the Dockerfile significantly.
* No need for curl.
This commit is contained in:
Kyle Manna 2015-09-08 10:10:01 -07:00
parent 3da0efa5bc
commit 23f66094ff

View File

@ -1,22 +1,18 @@
# Original credit: https://github.com/jpetazzo/dockvpn # Original credit: https://github.com/jpetazzo/dockvpn
# Leaner build then Ubunutu # Leaner build then Ubuntu
FROM alpine:3.2 FROM alpine:3.2
MAINTAINER Kyle Manna <kyle@kylemanna.com> MAINTAINER Kyle Manna <kyle@kylemanna.com>
RUN apk update && \ RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
apk add openvpn iptables curl bash && \ apk add --update openvpn iptables bash easy-rsa && \
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
RUN mkdir -p /usr/local/share/easy-rsa && cd /usr/local/share/easy-rsa && \
curl -L https://github.com/OpenVPN/easy-rsa/archive/v3.0.0.tar.gz | tar xzf - easy-rsa-3.0.0/easyrsa3 && \
mv easy-rsa-3.0.0/easyrsa3 . && rmdir easy-rsa-3.0.0 && \
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin
# Needed by scripts # Needed by scripts
ENV OPENVPN /etc/openvpn ENV OPENVPN /etc/openvpn
ENV EASYRSA /usr/local/share/easy-rsa/easyrsa3 ENV EASYRSA /usr/share/easy-rsa
ENV EASYRSA_PKI $OPENVPN/pki ENV EASYRSA_PKI $OPENVPN/pki
ENV EASYRSA_VARS_FILE $OPENVPN/vars ENV EASYRSA_VARS_FILE $OPENVPN/vars