2016-10-08 04:03:54 +02:00
|
|
|
FROM alpine:latest
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL 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 \
|
2017-03-22 20:29:18 +01:00
|
|
|
ca-certificates
|
2015-07-28 10:36:22 +02:00
|
|
|
|
2018-03-23 16:52:55 +01:00
|
|
|
ENV VAULT_VERSION v0.9.6
|
2016-02-04 20:28:47 +01:00
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
bash \
|
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
make \
|
|
|
|
zip \
|
|
|
|
' \
|
|
|
|
set -x \
|
2016-10-25 22:37:56 +02:00
|
|
|
&& apk --no-cache add --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \
|
2016-02-04 20:28:47 +01:00
|
|
|
&& mkdir -p /go/src/github.com/hashicorp \
|
2016-12-28 02:04:58 +01:00
|
|
|
&& git clone --depth 1 --branch ${VAULT_VERSION} https://github.com/hashicorp/vault /go/src/github.com/hashicorp/vault \
|
2016-02-04 20:28:47 +01:00
|
|
|
&& 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" ]
|