mirror of
https://github.com/Luzifer/vault-openvpn.git
synced 2024-12-26 06:41:20 +00:00
Update Dockerfile
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
260d4c2f7f
commit
a0014dec27
1 changed files with 21 additions and 9 deletions
30
Dockerfile
30
Dockerfile
|
@ -1,16 +1,28 @@
|
||||||
FROM golang:alpine
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
COPY . /go/src/github.com/Luzifer/vault-openvpn
|
||||||
|
|
||||||
ADD . /go/src/github.com/Luzifer/vault-openvpn
|
|
||||||
WORKDIR /go/src/github.com/Luzifer/vault-openvpn
|
WORKDIR /go/src/github.com/Luzifer/vault-openvpn
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --update git ca-certificates \
|
&& apk add --update git \
|
||||||
&& go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
&& go install \
|
||||||
&& apk del --purge git
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
||||||
|
-mod=readonly
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/Luzifer/vault-openvpn/example/openvpn-sample
|
FROM alpine:latest
|
||||||
|
|
||||||
ENTRYPOINT ["/go/bin/vault-openvpn"]
|
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"]
|
||||||
CMD ["--"]
|
CMD ["--"]
|
||||||
|
|
||||||
|
# vim: set ft=Dockerfile:
|
||||||
|
|
Loading…
Reference in a new issue