2020-03-26 03:43:36 +00:00
|
|
|
# Original credit: https://github.com/jpetazzo/dockvpn
|
|
|
|
|
|
|
|
# Smallest base image
|
2023-03-17 03:59:32 +00:00
|
|
|
FROM arm32v7/ubuntu:18.10
|
2020-03-26 03:43:36 +00:00
|
|
|
|
|
|
|
LABEL maintainer="lawtancool"
|
|
|
|
|
2020-03-26 04:30:10 +00:00
|
|
|
COPY qemu-arm-static /usr/bin
|
|
|
|
|
2020-03-26 03:43:36 +00:00
|
|
|
# Testing: pamtester
|
|
|
|
#RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
|
|
|
|
# apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester && \
|
|
|
|
# ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
|
|
|
# rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y wget tar unzip build-essential libssl-dev iproute2 liblz4-dev liblzo2-dev libpam0g-dev libpkcs11-helper1-dev libsystemd-dev easy-rsa iptables pkg-config && \
|
2021-07-07 02:33:09 +00:00
|
|
|
wget https://swupdate.openvpn.org/community/releases/openvpn-2.5.3.tar.gz && tar xvf openvpn-2.5.3.tar.gz && \
|
|
|
|
wget https://github.com/Tunnelblick/Tunnelblick/archive/refs/tags/v3.8.6beta05.zip && unzip v3.8.6beta05.zip && \
|
|
|
|
cp Tunnelblick-3.8.6beta05/third_party/sources/openvpn/openvpn-2.5.3/patches/*.diff openvpn-2.5.3 && \
|
|
|
|
cd openvpn-2.5.3 && \
|
2020-03-26 03:43:36 +00:00
|
|
|
patch -p1 < 02-tunnelblick-openvpn_xorpatch-a.diff && \
|
|
|
|
patch -p1 < 03-tunnelblick-openvpn_xorpatch-b.diff && \
|
|
|
|
patch -p1 < 04-tunnelblick-openvpn_xorpatch-c.diff && \
|
|
|
|
patch -p1 < 05-tunnelblick-openvpn_xorpatch-d.diff && \
|
|
|
|
patch -p1 < 06-tunnelblick-openvpn_xorpatch-e.diff && \
|
|
|
|
./configure --disable-systemd --enable-async-push --enable-iproute2 && \
|
2020-03-26 16:47:36 +00:00
|
|
|
make && make install && \
|
2021-07-07 02:33:09 +00:00
|
|
|
cd .. && rm -r openvpn-2.5.3 && rm -r Tunnelblick-3.8.6beta05
|
2020-03-26 03:43:36 +00:00
|
|
|
|
|
|
|
# Needed by scripts
|
|
|
|
ENV OPENVPN /etc/openvpn
|
|
|
|
ENV EASYRSA /usr/share/easy-rsa
|
|
|
|
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"]
|
|
|
|
|
2020-03-26 16:47:36 +00:00
|
|
|
# Internally uses port 1194, remap if needed using `docker run -p 443:1194/tcp`
|
2020-03-26 03:43:36 +00:00
|
|
|
EXPOSE 1194
|
|
|
|
|
|
|
|
CMD ["ovpn_run"]
|
|
|
|
|
|
|
|
ADD ./bin /usr/local/bin
|
|
|
|
RUN chmod a+x /usr/local/bin/*
|
|
|
|
|
|
|
|
# Add support for OTP authentication using a PAM module
|
|
|
|
ADD ./otp/openvpn /etc/pam.d/
|