dockerfiles/vault/Dockerfile
Jess Frazelle bc03c7e52e
update versions
Signed-off-by: Jess Frazelle <jess@oxide.computer>
2020-05-14 22:41:28 -07:00

35 lines
766 B
Docker

FROM golang:alpine as builder
LABEL maintainer="Jessica Frazelle <jess@linux.com>"
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
RUN apk add --no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ \
bash \
ca-certificates \
git \
make \
npm \
yarn \
zip
ENV VAULT_VERSION v1.4.1
RUN go get github.com/hashicorp/vault || true
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
COPY --from=builder /usr/bin/vault /usr/bin/vault
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
ENTRYPOINT [ "vault" ]
CMD [ "--help" ]