2021-05-08 12:47:00 +00:00
|
|
|
FROM golang:alpine as builder
|
2017-11-10 20:05:34 +00:00
|
|
|
|
2021-05-08 12:47:00 +00:00
|
|
|
COPY . /go/src/github.com/Luzifer/vault-openvpn
|
2017-11-10 20:05:34 +00:00
|
|
|
WORKDIR /go/src/github.com/Luzifer/vault-openvpn
|
|
|
|
|
|
|
|
RUN set -ex \
|
2021-05-08 12:47:00 +00:00
|
|
|
&& apk add --update git \
|
|
|
|
&& go install \
|
|
|
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
|
|
|
-mod=readonly
|
2017-11-10 20:05:34 +00:00
|
|
|
|
2021-05-08 12:47:00 +00:00
|
|
|
FROM alpine:latest
|
2017-11-10 20:05:34 +00:00
|
|
|
|
2021-05-08 12:47:00 +00:00
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add \
|
|
|
|
ca-certificates
|
|
|
|
|
|
|
|
COPY --from=builder /go/bin/vault-openvpn /usr/local/bin/vault-openvpn
|
|
|
|
COPY --from=builder /go/src/github.com/Luzifer/vault-openvpn/example/openvpn-sample /usr/local/share/vault-openvpn
|
|
|
|
|
|
|
|
WORKDIR /usr/local/share/vault-openvpn
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/vault-openvpn"]
|
2017-11-10 20:05:34 +00:00
|
|
|
CMD ["--"]
|
2021-05-08 12:47:00 +00:00
|
|
|
|
|
|
|
# vim: set ft=Dockerfile:
|