2016-04-07 22:26:38 +02:00
|
|
|
# use alpine edge for go 1.6
|
|
|
|
FROM alpine:edge
|
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-04-07 22:26:38 +02: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-04-07 22:26:38 +02:00
|
|
|
ENV VAULT_VERSION v0.5.2
|
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 \
|
2016-04-07 22:26:38 +02:00
|
|
|
&& go get github.com/mitchellh/gox \
|
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" ]
|