-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworked labels, readme and added License
- Loading branch information
Showing
4 changed files
with
109 additions
and
67 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,23 +1,32 @@ | ||
FROM alpine:3.8 | ||
LABEL maintainer="[email protected]" \ | ||
description="VPN client to private internet access servers using OpenVPN, IPtables firewall, DNS over TLS with Unbound and Alpine Linux" \ | ||
download="6.6MB" \ | ||
size="15.7MB" \ | ||
ram="13MB" \ | ||
cpu_usage="Low" \ | ||
github="https://github.com/qdm12/private-internet-access-docker" | ||
ARG ALPINE_VERSION=3.8 | ||
|
||
FROM alpine:${ALPINE_VERSION} | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
LABEL org.label-schema.schema-version="1.0.0-rc1" \ | ||
maintainer="[email protected]" \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/qdm12/private-internet-access-docker" \ | ||
org.label-schema.url="https://github.com/qdm12/private-internet-access-docker" \ | ||
org.label-schema.vcs-description="VPN client to tunnel to private internet access servers using OpenVPN, IPtables, DNS over TLS and Alpine Linux" \ | ||
org.label-schema.vcs-usage="https://github.com/qdm12/private-internet-access-docker/blob/master/README.md#setup" \ | ||
org.label-schema.docker.cmd="docker run -d -v ./auth.conf:/auth.conf:ro --cap-add=NET_ADMIN --device=/dev/net/tun qmcgaw/private-internet-access" \ | ||
org.label-schema.docker.cmd.devel="docker run -it --rm -v ./auth.conf:/auth.conf:ro --cap-add=NET_ADMIN --device=/dev/net/tun qmcgaw/private-internet-access" \ | ||
org.label-schema.docker.params="" \ | ||
org.label-schema.version="" \ | ||
image-size="17.1MB" \ | ||
ram-usage="13MB to 80MB" \ | ||
cpu-usage="Low" | ||
ENV ENCRYPTION=strong \ | ||
PROTOCOL=tcp \ | ||
REGION="CA Montreal" \ | ||
BLOCK_MALICIOUS=off | ||
HEALTHCHECK --interval=5m --timeout=15s --start-period=10s --retries=2 \ | ||
CMD if [[ "$(wget -qqO- 'https://duckduckgo.com/?q=what+is+my+ip' | grep -ow 'Your IP address is [0-9.]*[0-9]' | grep -ow '[0-9][0-9.]*')" == "$INITIAL_IP" ]]; then echo "IP address is the same as the non VPN IP address"; exit 1; fi | ||
COPY --from=qmcgaw/dns-trustanchor /named.root /etc/unbound/root.hints | ||
COPY --from=qmcgaw/dns-trustanchor /root.key /etc/unbound/root.key | ||
RUN echo https://dl-3.alpinelinux.org/alpine/v3.8/main > /etc/apk/repositories && \ | ||
apk add -q --progress --no-cache --update openvpn wget ca-certificates iptables unbound && \ | ||
apk add -q --progress --no-cache --update --virtual=build-dependencies unzip && \ | ||
mkdir /openvpn-udp-normal /openvpn-udp-strong /openvpn-tcp-normal /openvpn-tcp-strong && \ | ||
RUN V_ALPINE="v$(cat /etc/alpine-release | grep -oE '[0-9]+\.[0-9]+')" && \ | ||
echo https://dl-3.alpinelinux.org/alpine/$V_ALPINE/main > /etc/apk/repositories && \ | ||
apk add -q --progress --no-cache --update openvpn wget ca-certificates iptables unbound unzip && \ | ||
wget -q https://www.privateinternetaccess.com/openvpn/openvpn.zip \ | ||
https://www.privateinternetaccess.com/openvpn/openvpn-strong.zip \ | ||
https://www.privateinternetaccess.com/openvpn/openvpn-tcp.zip \ | ||
|
@@ -26,13 +35,15 @@ RUN echo https://dl-3.alpinelinux.org/alpine/v3.8/main > /etc/apk/repositories & | |
unzip -q openvpn-strong.zip -d /openvpn-udp-strong && \ | ||
unzip -q openvpn-tcp.zip -d /openvpn-tcp-normal && \ | ||
unzip -q openvpn-strong-tcp.zip -d /openvpn-tcp-strong && \ | ||
apk del -q --progress --purge build-dependencies && \ | ||
apk del -q --progress --purge unzip && \ | ||
rm -rf /*.zip /var/cache/apk/* /etc/unbound/unbound.conf && \ | ||
chown unbound /etc/unbound/root.key && \ | ||
adduser -S nonrootuser | ||
COPY unbound.conf /etc/unbound/unbound.conf | ||
COPY --from=qmcgaw/dns-trustanchor /named.root /etc/unbound/root.hints | ||
COPY --from=qmcgaw/dns-trustanchor /root.key /etc/unbound/root.key | ||
COPY --from=qmcgaw/malicious-hostnames /malicious-hostnames.bz2 /etc/unbound/malicious-hostnames.bz2 | ||
COPY --from=qmcgaw/malicious-ips /malicious-ips.bz2 /etc/unbound/malicious-ips.bz2 | ||
COPY unbound.conf /etc/unbound/unbound.conf | ||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod 700 /entrypoint.sh | ||
RUN chown unbound /etc/unbound/root.key && \ | ||
chmod 700 /entrypoint.sh | ||
ENTRYPOINT /entrypoint.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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Quentin McGaw | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# see http://label-schema.org/rc1 | ||
# https://docs.docker.com/docker-cloud/builds/advanced/#override-build-test-or-push-commands | ||
# https://docs.docker.com/docker-cloud/builds/advanced/#custom-build-phase-hooks | ||
|
||
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
-t $IMAGE_NAME . |