From fee5a43aea94defd6459f31c68a2af06727f12bd Mon Sep 17 00:00:00 2001 From: Hector Rivas Gandara Date: Tue, 8 Mar 2016 16:26:32 +0000 Subject: [PATCH] Use the latest spruce 1.1.2 from release We have been using the version 0.13.0 of spruce, but compiling it in the Dockerfile because the release binary version did link to the debian/ubuntu libc. We were not pinning the git commit of the spruce code. But the upstream project has some changes that makes fail the build, probably new dependencies added which require the use of godep. As since https://github.com/geofffranks/spruce/issues/83 the binary in the releases is OK and can work in a plain alpine, we can create a container pulling the binary release. This will simplify our container, make it smaller and pin the version number. --- spruce/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spruce/Dockerfile b/spruce/Dockerfile index 632c12a5..d0787222 100644 --- a/spruce/Dockerfile +++ b/spruce/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.5.1-alpine +FROM alpine:3.3 -ENV SPRUCE_VERSION 0.13.0 +ENV SPRUCE_VERSION 1.1.2 -RUN apk add --update git \ - && go get -d github.com/geofffranks/spruce \ - && cd ${GOPATH}/src/github.com/geofffranks/spruce \ - && git checkout v${SPRUCE_VERSION} \ - && go install \ - && apk del git \ +ENV PACKAGES "curl openssl ca-certificates" + +RUN apk add --update $PACKAGES \ + && curl -f -L https://github.com/geofffranks/spruce/releases/download/v$SPRUCE_VERSION/spruce-linux-amd64 > /usr/local/bin/spruce \ + && chmod +x /usr/local/bin/spruce \ + && apk del $PACKAGES \ && rm -rf /var/cache/apk/*