From 98a662c51119d33787cd1dac96c3a2a37888e661 Mon Sep 17 00:00:00 2001 From: jasongwartz Date: Fri, 10 Nov 2017 11:43:50 +0100 Subject: [PATCH] Adds Dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..04b9739 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Usage: +# docker run --rm -it -e VAULT_ADDR=':8200' -e VAULT_TOKEN='' jasongwartz/vault-openvpn +# Example: +# docker run --rm -it -e VAULT_ADDR='https://myvault.example.com:8200' -e VAULT_TOKEN='fdas-fdasf-fdsa-23t-das' jasongwartz/vault-openvpn --pki-mountpoint vault-pki list +FROM golang:alpine + +WORKDIR /go/src/vault-openvpn +COPY . . + +RUN apk update && apk add git curl + +ENV GOBIN=$GOPATH/bin +RUN go-wrapper download +RUN go-wrapper install + +RUN curl https://raw.githubusercontent.com/Luzifer/vault-openvpn/master/example/openvpn-sample/client.conf > client.conf +RUN curl https://raw.githubusercontent.com/Luzifer/vault-openvpn/master/example/openvpn-sample/server.conf > server.conf + +ENTRYPOINT ["vault-openvpn"]