2018-04-17 09:59:17 +02:00
|
|
|
FROM alpine:latest
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2015-01-27 12:05:21 +01:00
|
|
|
|
2015-12-28 21:31: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
|
2015-12-28 21:31:47 +01:00
|
|
|
|
2016-06-06 05:40:20 +02:00
|
|
|
RUN apk --no-cache add \
|
2017-03-22 20:29:18 +01:00
|
|
|
ca-certificates
|
2015-06-09 22:44:12 +02:00
|
|
|
|
2018-07-04 18:48:25 +02:00
|
|
|
ENV CONSUL_VERSION v1.2.0
|
2015-12-28 21:31:47 +01:00
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
bash \
|
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
2015-12-28 23:45:03 +01:00
|
|
|
g++ \
|
2015-12-28 21:31:47 +01:00
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
make \
|
2015-12-28 23:45:03 +01:00
|
|
|
nodejs \
|
|
|
|
ruby \
|
|
|
|
ruby-dev \
|
2015-12-28 21:31:47 +01:00
|
|
|
zip \
|
|
|
|
' \
|
|
|
|
set -x \
|
2016-12-02 22:42:52 +01:00
|
|
|
&& apk --no-cache add --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \
|
2015-12-28 21:31:47 +01:00
|
|
|
&& mkdir -p /go/src/github.com/hashicorp /etc/consul.d \
|
2016-12-28 02:04:58 +01:00
|
|
|
&& git clone --depth 1 --branch ${CONSUL_VERSION} https://github.com/hashicorp/consul /go/src/github.com/hashicorp/consul \
|
2015-12-28 21:31:47 +01:00
|
|
|
&& cd /go/src/github.com/hashicorp/consul \
|
2018-04-17 09:59:17 +02:00
|
|
|
&& XC_ARCH="amd64" XC_OS="linux" make bin \
|
2015-12-28 21:31:47 +01:00
|
|
|
&& apk del $buildDeps \
|
|
|
|
&& rm -rf /go \
|
|
|
|
&& echo "Build complete."
|
2015-06-09 22:44:12 +02:00
|
|
|
|
2015-01-27 12:05:21 +01:00
|
|
|
|
2015-12-28 21:31:47 +01:00
|
|
|
ENTRYPOINT [ "consul" ]
|