forked from chadoe/docker-openvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (22 loc) · 786 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
FROM alpine:edge
MAINTAINER Martin van Beurden <chadoe@gmail.com>
COPY ./bin /usr/local/bin
RUN apk add --no-cache bash openvpn=2.5.8-r0 git openssl iptables && \
# Get easy-rsa
git clone -b v3.0.6 --depth 1 https://github.com/OpenVPN/easy-rsa.git /tmp/easy-rsa && \
cd && \
# Cleanup
apk del git && \
rm -rf /tmp/easy-rsa/.git && cp -a /tmp/easy-rsa /usr/local/share/ && \
rm -rf /tmp/easy-rsa/ && \
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin && \
chmod 774 /usr/local/bin/*
# Needed by scripts
ENV OPENVPN=/etc/openvpn \
EASYRSA=/usr/local/share/easy-rsa/easyrsa3 \
EASYRSA_PKI=/etc/openvpn/pki \
EASYRSA_VARS_FILE=/etc/openvpn/vars
VOLUME ["/etc/openvpn"]
EXPOSE 1194/udp
WORKDIR /etc/openvpn
CMD ["startopenvpn"]