forked from dperson/openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Personette
committed
Oct 23, 2017
1 parent
ff73ff1
commit 88fce1f
Showing
6 changed files
with
33 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
FROM debian:stretch | ||
FROM alpine | ||
MAINTAINER David Personette <[email protected]> | ||
|
||
# Install openvpn | ||
RUN export DEBIAN_FRONTEND='noninteractive' && \ | ||
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 && \ | ||
addgroup --system vpn && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* | ||
RUN apk --no-cache --no-progress add bash curl ip6tables iptables openvpn \ | ||
shadow && \ | ||
addgroup -S vpn && \ | ||
rm -rf /tmp/* | ||
|
||
COPY openvpn.sh /usr/bin/ | ||
|
||
HEALTHCHECK --interval=60s --timeout=15s --start-period=120s \ | ||
CMD curl -L 'https://api.ipify.org' | ||
|
||
VOLUME ["/vpn"] | ||
|
||
ENTRYPOINT ["openvpn.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM resin/armhf-alpine | ||
MAINTAINER David Personette <[email protected]> | ||
|
||
# Install openvpn | ||
RUN ["cross-build-start"] | ||
RUN apk --no-cache add bash curl ip6tables iptables openvpn shadow && \ | ||
addgroup -S vpn && \ | ||
rm -rf /tmp/* | ||
RUN ["cross-build-end"] | ||
|
||
COPY openvpn.sh /usr/bin/ | ||
|
||
HEALTHCHECK --interval=60s --timeout=15s --start-period=120s \ | ||
CMD curl -L 'https://api.ipify.org' | ||
|
||
VOLUME ["/vpn"] | ||
|
||
ENTRYPOINT ["openvpn.sh"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters