forked from kylemanna/docker-openvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 1004 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Original credit:
# https://github.com/jpetazzo/dockvpn &
# https://github.com/kylemanna/docker-openvpn &
# https://github.com/jnummelin/docker-openvpn
# https://github.com/kontena/openvpn
FROM ubuntu:xenial
MAINTAINER Farfeduc
RUN apt-get update && \
apt-get install -y openvpn iptables git-core netmask && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN git clone --depth 1 --branch master https://github.com/OpenVPN/easy-rsa.git /usr/local/share/easy-rsa && \
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /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
# Prevents refused client connection because of an expired CRL
ENV EASYRSA_CRL_DAYS 3650
VOLUME ["/etc/openvpn"]
# Internally uses port 1194, remap using docker
EXPOSE 1194/udp
WORKDIR /etc/openvpn
CMD ["start_vpn.sh"]
ADD ./bin /usr/local/bin
RUN chmod a+x /usr/local/bin/*