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
|
FROM golang:alpine as builder
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
MAINTAINER Jessica Frazelle <jess@linux.com>
|
||||||
|
|
||||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk add --no-cache \
|
||||||
ca-certificates
|
--repository https://dl-3.alpinelinux.org/alpine/edge/main/ \
|
||||||
|
bash \
|
||||||
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
npm \
|
||||||
|
yarn \
|
||||||
|
zip
|
||||||
|
|
||||||
ENV VAULT_VERSION v0.10.3
|
ENV VAULT_VERSION v0.10.3
|
||||||
|
|
||||||
RUN buildDeps=' \
|
RUN go get github.com/hashicorp/vault
|
||||||
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."
|
|
||||||
|
|
||||||
|
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" ]
|
ENTRYPOINT [ "vault" ]
|
||||||
|
CMD [ "--help" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user