update vault

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
Jessica Frazelle 2016-02-04 11:28:47 -08:00
parent a09f5b5ce1
commit 62015084ca
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -1,17 +1,40 @@
FROM alpine:latest
FROM alpine
MAINTAINER Jessica Frazelle <jess@docker.com>
RUN apk update && apk add \
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
RUN apk update && apk add \
ca-certificates \
curl \
&& curl -sSL https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk -o /tmp/glibc-2.21-r2.apk \
&& apk add --allow-untrusted /tmp/glibc-2.21-r2.apk \
&& curl -sSL https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-bin-2.21-r2.apk -o /tmp/glibc-bin-2.21-r2.apk \
&& apk add --allow-untrusted /tmp/glibc-bin-2.21-r2.apk \
&& rm -rf /tmp/glibc* \
&& rm -rf /var/cache/apk/*
RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/vault -o /bin/vault \
&& chmod +x /bin/vault
ENV VAULT_VERSION v0.4.1
ENTRYPOINT [ "/bin/vault" ]
RUN buildDeps=' \
bash \
go \
git \
gcc \
g++ \
libc-dev \
libgcc \
make \
zip \
' \
set -x \
&& apk update \
&& apk add $buildDeps \
&& mkdir -p /go/src/github.com/hashicorp \
&& git clone --branch ${VAULT_VERSION} https://github.com/hashicorp/vault /go/src/github.com/hashicorp/vault \
&& cd /go/src/github.com/hashicorp/vault \
&& make bootstrap \
&& make bin \
&& mv bin/vault /usr/bin/ \
&& apk del $buildDeps \
&& rm -rf /var/cache/apk/* \
&& rm -rf /go \
&& echo "Build complete."
ENTRYPOINT [ "vault" ]