container-openvpn/Dockerfile
Kyle Manna 23f66094ff alpine: Use easy-rsa in testing branch of alpine
* Simplifes the Dockerfile significantly.
* No need for curl.
2015-09-10 10:33:05 -07:00

29 lines
750 B
Docker

# Original credit: https://github.com/jpetazzo/dockvpn
# Leaner build then Ubuntu
FROM alpine:3.2
MAINTAINER Kyle Manna <kyle@kylemanna.com>
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
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/*
# Needed by scripts
ENV OPENVPN /etc/openvpn
ENV EASYRSA /usr/share/easy-rsa
ENV EASYRSA_PKI $OPENVPN/pki
ENV EASYRSA_VARS_FILE $OPENVPN/vars
VOLUME ["/etc/openvpn"]
# Internally uses port 1194/udp, remap using `docker run -p 443:1194/tcp`
EXPOSE 1194/udp
WORKDIR /etc/openvpn
CMD ["ovpn_run"]
ADD ./bin /usr/local/bin
RUN chmod a+x /usr/local/bin/*