2016-02-04 20:28:47 +01:00
|
|
|
FROM alpine
|
2015-07-28 10:36:22 +02:00
|
|
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
|
|
|
|
2016-02-04 20:28:47 +01:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
2016-03-22 19:34:34 +01:00
|
|
|
#ENV GO15VENDOREXPERIMENT 1
|
2016-02-04 20:28:47 +01:00
|
|
|
|
|
|
|
RUN apk update && apk add \
|
2015-07-28 10:36:22 +02:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
2016-03-22 19:34:34 +01:00
|
|
|
ENV VAULT_VERSION v0.5.0
|
2016-02-04 20:28:47 +01:00
|
|
|
|
|
|
|
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 \
|
2016-03-22 19:34:34 +01:00
|
|
|
&& XC_ARCH="amd64" XC_OS="linux" make bin \
|
2016-02-04 20:28:47 +01:00
|
|
|
&& mv bin/vault /usr/bin/ \
|
|
|
|
&& apk del $buildDeps \
|
|
|
|
&& rm -rf /var/cache/apk/* \
|
|
|
|
&& rm -rf /go \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2016-02-04 20:28:47 +01:00
|
|
|
ENTRYPOINT [ "vault" ]
|