2016-04-07 22:26:38 +02:00
|
|
|
# use alpine edge for go 1.6
|
|
|
|
FROM alpine:edge
|
2016-09-20 00:25:05 +02:00
|
|
|
MAINTAINER Jessie Frazelle <jess@linux.com>
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2016-02-04 20:28:47 +01:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2016-06-06 05:40:20 +02:00
|
|
|
RUN apk --no-cache add \
|
2015-07-28 10:36:22 +02:00
|
|
|
ca-certificates \
|
2016-06-06 05:40:20 +02:00
|
|
|
curl
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2016-09-19 20:06:08 +02:00
|
|
|
ENV VAULT_VERSION v0.6.1
|
2016-02-04 20:28:47 +01:00
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
bash \
|
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
make \
|
|
|
|
zip \
|
|
|
|
' \
|
|
|
|
set -x \
|
2016-06-06 05:40:20 +02:00
|
|
|
&& apk --no-cache add $buildDeps \
|
2016-02-04 20:28:47 +01:00
|
|
|
&& 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 \
|
2016-04-07 22:26:38 +02:00
|
|
|
&& go get github.com/mitchellh/gox \
|
2016-05-28 17:25:58 +02:00
|
|
|
&& XC_ARCH="amd64" XC_OS="linux" XC_OSARCH="linux/amd64" make bin \
|
2016-02-04 20:28:47 +01:00
|
|
|
&& mv bin/vault /usr/bin/ \
|
|
|
|
&& apk del $buildDeps \
|
|
|
|
&& rm -rf /go \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2016-02-04 20:28:47 +01:00
|
|
|
ENTRYPOINT [ "vault" ]
|