dockerfiles/devops/consul/Dockerfile

18 lines
520 B
Docker
Raw Normal View History

2016-04-18 17:02:57 +00:00
FROM alpine:edge
ENV CONSUL_VERSION v0.6.4
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk update; apk upgrade && \
apk add curl make git go gcc musl-dev openssl-dev && \
mkdir /go && \
export GOPATH=/go && \
2016-04-18 17:20:56 +00:00
go get -u -tags ${CONSUL_VERSION} github.com/hashicorp/consul && \
2016-04-18 17:02:57 +00:00
echo "consul built" && \
mv /go/bin/* /usr/local/bin && \
rm -rf /go && \
2016-04-18 17:20:56 +00:00
apk del make git go gcc musl-dev openssl-dev && \
2016-04-18 17:02:57 +00:00
rm -rf /var/cache/apk/*
CMD /usr/local/bin/consul