mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-30 13:28:30 +01:00
211be83b50
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
39 lines
842 B
Docker
39 lines
842 B
Docker
FROM alpine:latest
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
ENV GOPATH /go
|
|
#ENV GO15VENDOREXPERIMENT 1
|
|
|
|
RUN apk --no-cache add \
|
|
ca-certificates
|
|
|
|
ENV CONSUL_VERSION v1.1.0
|
|
|
|
RUN buildDeps=' \
|
|
bash \
|
|
go \
|
|
git \
|
|
gcc \
|
|
g++ \
|
|
libc-dev \
|
|
libgcc \
|
|
make \
|
|
nodejs \
|
|
ruby \
|
|
ruby-dev \
|
|
zip \
|
|
' \
|
|
set -x \
|
|
&& apk --no-cache add --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \
|
|
&& mkdir -p /go/src/github.com/hashicorp /etc/consul.d \
|
|
&& git clone --depth 1 --branch ${CONSUL_VERSION} https://github.com/hashicorp/consul /go/src/github.com/hashicorp/consul \
|
|
&& cd /go/src/github.com/hashicorp/consul \
|
|
&& XC_ARCH="amd64" XC_OS="linux" make bin \
|
|
&& apk del $buildDeps \
|
|
&& rm -rf /go \
|
|
&& echo "Build complete."
|
|
|
|
|
|
ENTRYPOINT [ "consul" ]
|