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 && \
|
|
|
|
apt-get install -y openvpn iptables git-core && \
|
|
|
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2014-06-04 03:54:47 +00:00
|
|
|
|
2014-06-04 04:10:55 +00:00
|
|
|
# Update checkout to use tags when v3.0 is finally released
|
2014-12-05 22:07:00 +00:00
|
|
|
RUN git clone --depth 1 --branch v3.0.0-rc2 https://github.com/OpenVPN/easy-rsa.git /usr/local/share/easy-rsa && \
|
|
|
|
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
|
|
|
|
RUN chmod a+x /usr/local/bin/*
|