2018-07-06 19:09:46 +02:00
|
|
|
FROM golang:alpine as builder
|
2019-02-21 09:06:27 +01:00
|
|
|
LABEL maintainer="Jessica Frazelle <jess@linux.com>"
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2016-02-04 20:28:47 +01:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2018-07-06 19:09:46 +02:00
|
|
|
RUN apk add --no-cache \
|
2018-11-29 22:49:49 +01:00
|
|
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ \
|
2018-07-06 19:09:46 +02:00
|
|
|
bash \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
make \
|
|
|
|
npm \
|
|
|
|
yarn \
|
|
|
|
zip
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2020-05-15 07:41:28 +02:00
|
|
|
ENV VAULT_VERSION v1.4.1
|
2016-02-04 20:28:47 +01:00
|
|
|
|
2019-09-16 22:15:54 +02:00
|
|
|
RUN go get github.com/hashicorp/vault || true
|
2018-07-06 19:09:46 +02:00
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/hashicorp/vault
|
|
|
|
|
|
|
|
RUN git checkout "${VAULT_VERSION}"
|
|
|
|
|
|
|
|
RUN XC_ARCH="amd64" XC_OS="linux" XC_OSARCH="linux/amd64" LD_FLAGS=" -extldflags -static " make bootstrap static-dist bin \
|
|
|
|
&& mv bin/vault /usr/bin/vault
|
|
|
|
|
|
|
|
FROM alpine:latest
|
2016-02-04 20:28:47 +01:00
|
|
|
|
2018-07-06 19:09:46 +02:00
|
|
|
COPY --from=builder /usr/bin/vault /usr/bin/vault
|
|
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2016-02-04 20:28:47 +01:00
|
|
|
ENTRYPOINT [ "vault" ]
|
2018-07-06 19:09:46 +02:00
|
|
|
CMD [ "--help" ]
|