mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
fix vault
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
7ea44feb77
commit
6adef5e0cb
|
@ -1,38 +1,36 @@
|
|||
FROM alpine:latest
|
||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||
FROM golang:alpine as builder
|
||||
MAINTAINER Jessica Frazelle <jess@linux.com>
|
||||
|
||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||
ENV GOPATH /go
|
||||
|
||||
RUN apk --no-cache add \
|
||||
ca-certificates
|
||||
RUN apk add --no-cache \
|
||||
--repository https://dl-3.alpinelinux.org/alpine/edge/main/ \
|
||||
bash \
|
||||
ca-certificates \
|
||||
git \
|
||||
make \
|
||||
npm \
|
||||
yarn \
|
||||
zip
|
||||
|
||||
ENV VAULT_VERSION v0.10.3
|
||||
|
||||
RUN buildDeps=' \
|
||||
bash \
|
||||
go \
|
||||
git \
|
||||
gcc \
|
||||
g++ \
|
||||
libc-dev \
|
||||
libgcc \
|
||||
make \
|
||||
yarn \
|
||||
zip \
|
||||
' \
|
||||
set -x \
|
||||
&& apk --no-cache add --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \
|
||||
&& mkdir -p /go/src/github.com/hashicorp \
|
||||
&& git clone --depth 1 --branch ${VAULT_VERSION} https://github.com/hashicorp/vault /go/src/github.com/hashicorp/vault \
|
||||
&& cd /go/src/github.com/hashicorp/vault \
|
||||
&& go get github.com/mitchellh/gox \
|
||||
&& yarn global add bower \
|
||||
&& XC_ARCH="amd64" XC_OS="linux" XC_OSARCH="linux/amd64" make bootstrap static-dist bin \
|
||||
&& mv bin/vault /usr/bin/ \
|
||||
&& apk del $buildDeps \
|
||||
&& rm -rf /go \
|
||||
&& echo "Build complete."
|
||||
RUN go get github.com/hashicorp/vault
|
||||
|
||||
WORKDIR /go/src/github.com/hashicorp/vault
|
||||
|
||||
RUN git checkout "${VAULT_VERSION}"
|
||||
|
||||
#RUN yarn global add bower
|
||||
|
||||
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" ]
|
||||
|
|
Loading…
Reference in New Issue
Block a user