forked from dperson/openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.armhf
22 lines (19 loc) · 892 Bytes
/
Dockerfile.armhf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM armhf/debian:stretch
RUN apt-get update -qq && \
apt-get install -qqy --no-install-recommends iptables openvpn procps \
$(apt-get -s dist-upgrade|awk '/^Inst.*ecurity/ {print $2}') &&\
echo '#!/usr/bin/env bash' >/sbin/resolvconf && \
echo 'conf=/etc/resolv.conf' >>/sbin/resolvconf && \
echo '[[ -e $conf.orig ]] || cp -p $conf $conf.orig' >>/sbin/resolvconf && \
echo 'if [[ "${1:-""}" == "-a" ]]; then' >>/sbin/resolvconf && \
echo ' cat >${conf}' >>/sbin/resolvconf && \
echo 'elif [[ "${1:-""}" == "-d" ]]; then' >>/sbin/resolvconf && \
echo ' cat $conf.orig >$conf' >>/sbin/resolvconf && \
echo 'fi' >>/sbin/resolvconf && \
chmod +x /sbin/resolvconf && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
addgroup --system vpn
COPY openvpn.sh /usr/bin/
VOLUME ["/vpn"]
ENTRYPOINT ["openvpn.sh"]