2014-06-04 03:35:44 +00:00
|
|
|
# Original credit: https://github.com/jpetazzo/dockvpn
|
|
|
|
|
2014-06-04 18:42:37 +00:00
|
|
|
# Leaner build then Ubunutu
|
|
|
|
FROM debian:jessie
|
2014-06-04 03:35:44 +00:00
|
|
|
|
|
|
|
MAINTAINER Kyle Manna <kyle@kylemanna.com>
|
|
|
|
|
2014-12-05 21:55:53 +00:00
|
|
|
RUN apt-get update && \
|
2015-09-07 20:35:21 +00:00
|
|
|
apt-get install -y openvpn iptables curl && \
|
2014-12-05 21:55:53 +00:00
|
|
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2014-06-04 03:54:47 +00:00
|
|
|
|
2015-09-08 02:21:07 +00:00
|
|
|
RUN mkdir -p /usr/local/share/easy-rsa && \
|
|
|
|
curl -L https://github.com/OpenVPN/easy-rsa/archive/v3.0.0.tar.gz | tar xzf - --strip=1 -C /usr/local/share/easy-rsa easy-rsa-3.0.0/easyrsa3 && \
|
|
|
|
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin
|
2014-06-04 03:54:47 +00:00
|
|
|
|
2014-06-04 17:52:59 +00:00
|
|
|
# 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
|
|
|
|
|
2014-06-04 04:10:55 +00:00
|
|
|
VOLUME ["/etc/openvpn"]
|
2014-06-04 03:54:47 +00:00
|
|
|
|
2015-06-22 05:55:16 +00:00
|
|
|
# Internally uses port 1194/udp, remap using `docker run -p 443:1194/tcp`
|
2014-06-04 16:30:04 +00:00
|
|
|
EXPOSE 1194/udp
|
2014-06-04 03:54:47 +00:00
|
|
|
|
2014-07-06 17:55:17 +00:00
|
|
|
WORKDIR /etc/openvpn
|
2014-06-04 18:13:59 +00:00
|
|
|
CMD ["ovpn_run"]
|
|
|
|
|
|
|
|
ADD ./bin /usr/local/bin
|
2015-09-07 20:35:21 +00:00
|
|
|
RUN chmod +x /usr/local/bin/ovpn_* /usr/local/bin/easyrsa_*
|