From c69b7339568fd7ab900b55663ce3c51ed5cf5376 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Tue, 23 Jun 2015 23:58:09 +0200 Subject: [PATCH] Simplify Go dependency handling in Dockerfile. Also, put quotes around the GOPATH in the Makefile for safety in case of spaces, etc. --- Dockerfile | 3 +-- Makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9379a73e3..a2a7db723 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,8 @@ COPY . /go/src/github.com/prometheus/prometheus RUN apk add --update -t build-deps go git mercurial \ && apk add -u musl && rm -rf /var/cache/apk/* \ - && go get github.com/tools/godep \ && cd /go/src/$REPO_PATH \ - && $GOPATH/bin/godep restore && go get -d \ + && cp -a ./Godeps/_workspace/* "$GOPATH" \ && go build -ldflags " \ -X $REPO_PATH/version.Version $(cat version/VERSION) \ -X $REPO_PATH/version.Revision $(git rev-parse --short HEAD) \ diff --git a/Makefile b/Makefile index 94273ada5..51b17e757 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ $(SELFLINK): $(GOPATH) ln -s $(MAKEFILE_DIR) $@ $(GOPATH): - cp -a $(MAKEFILE_DIR)/Godeps/_workspace $(GOPATH) + cp -a $(MAKEFILE_DIR)/Godeps/_workspace "$(GOPATH)" dependencies: $(GOCC) | $(SELFLINK)