Mbonea commited on
Commit
d6fe2aa
1 Parent(s): aa3383a

Create Docker

Browse files
Files changed (1) hide show
  1. Docker +31 -0
Docker ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Original credit: https://github.com/jpetazzo/dockvpn
2
+
3
+ # Smallest base image
4
+ FROM alpine:latest
5
+
6
+ LABEL maintainer="Kyle Manna <kyle@kylemanna.com>"
7
+
8
+ # Testing: pamtester
9
+ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
10
+ apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester libqrencode && \
11
+ ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
12
+ rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
13
+
14
+ # Needed by scripts
15
+ ENV OPENVPN=/etc/openvpn
16
+ ENV EASYRSA=/usr/share/easy-rsa \
17
+ EASYRSA_CRL_DAYS=3650 \
18
+ EASYRSA_PKI=$OPENVPN/pki
19
+
20
+ VOLUME ["/etc/openvpn"]
21
+
22
+ # Internally uses port 1194/udp, remap using `docker run -p 443:1194/tcp`
23
+ EXPOSE 1194/udp
24
+
25
+ CMD ["ovpn_run"]
26
+
27
+ ADD ./bin /usr/local/bin
28
+ RUN chmod a+x /usr/local/bin/*
29
+
30
+ # Add support for OTP authentication using a PAM module
31
+ ADD ./otp/openvpn /etc/pam.d/