diff options
author | micah <micah@riseup.net> | 2020-01-07 11:55:38 -0800 |
---|---|---|
committer | micah <micah@riseup.net> | 2020-01-07 11:55:38 -0800 |
commit | 4015be99fe478285944ea81d01f37d2f75b04158 (patch) | |
tree | 9d63709f2a253b94e98b3d1c66b1af488746fa3c | |
parent | 7211d6a8cf4c0e6c1686cbf1df2d5b867f577f88 (diff) | |
parent | bb8d96ba79450659c0a459e86647eb0e998fea99 (diff) |
Merge branch 'chaperone' into 'master'
Add a Dockerfile and gitlab-ci
See merge request leap/vpnweb!3
-rw-r--r-- | .gitlab-ci.yml | 3 | ||||
-rw-r--r-- | Dockerfile | 18 | ||||
-rw-r--r-- | chaperone.d/vpnweb.conf | 4 |
3 files changed, 25 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a9385ad --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,3 @@ +--- +include: + - 'https://0xacab.org/leap/container-platform/glue/raw/master/.gitlab-ci.yml' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b867132 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM debian:buster AS build +RUN apt-get -q update && env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential pkg-config golang-go git ca-certificates openvpn \ + && rm -rf /var/lib/apt/lists/* + +# don't need to do bash tricks to keep the layers small, as this is a multi-stage build +ENV GOPATH=/go +WORKDIR $GOPATH +RUN go get -u 0xacab.org/leap/vpnweb +RUN strip $GOPATH/bin/vpnweb + +FROM registry.git.autistici.org/ai3/docker/chaperone-base + +COPY --from=build /go/bin/vpnweb /usr/local/bin/vpnweb +COPY chaperone.d/ /etc/chaperone.d + +ENTRYPOINT ["/usr/local/bin/chaperone"] + diff --git a/chaperone.d/vpnweb.conf b/chaperone.d/vpnweb.conf new file mode 100644 index 0000000..1c10f09 --- /dev/null +++ b/chaperone.d/vpnweb.conf @@ -0,0 +1,4 @@ +vpnweb-server.service: { + command: "/bin/sh -c 'exec /usr/local/bin/vpnweb -caCrt ${CLIENT_CA.CRT:-/etc/leap/ca/client_ca.crt} -caKey ${CLIENT_CA.KEY:-/etc/leap/ca/client_ca.key} -notls }'", + exit_kills: false +} |