mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Merge pull request #834 from prometheus/improve-dockerfile-deps
Simplify Go dependency handling in Dockerfile.
This commit is contained in:
commit
30fc04b240
|
@ -7,9 +7,8 @@ COPY . /go/src/github.com/prometheus/prometheus
|
||||||
|
|
||||||
RUN apk add --update -t build-deps go git mercurial \
|
RUN apk add --update -t build-deps go git mercurial \
|
||||||
&& apk add -u musl && rm -rf /var/cache/apk/* \
|
&& apk add -u musl && rm -rf /var/cache/apk/* \
|
||||||
&& go get github.com/tools/godep \
|
|
||||||
&& cd /go/src/$REPO_PATH \
|
&& cd /go/src/$REPO_PATH \
|
||||||
&& $GOPATH/bin/godep restore && go get -d \
|
&& cp -a ./Godeps/_workspace/* "$GOPATH" \
|
||||||
&& go build -ldflags " \
|
&& go build -ldflags " \
|
||||||
-X $REPO_PATH/version.Version $(cat version/VERSION) \
|
-X $REPO_PATH/version.Version $(cat version/VERSION) \
|
||||||
-X $REPO_PATH/version.Revision $(git rev-parse --short HEAD) \
|
-X $REPO_PATH/version.Revision $(git rev-parse --short HEAD) \
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -66,7 +66,7 @@ $(SELFLINK): $(GOPATH)
|
||||||
ln -s $(MAKEFILE_DIR) $@
|
ln -s $(MAKEFILE_DIR) $@
|
||||||
|
|
||||||
$(GOPATH):
|
$(GOPATH):
|
||||||
cp -a $(MAKEFILE_DIR)/Godeps/_workspace $(GOPATH)
|
cp -a $(MAKEFILE_DIR)/Godeps/_workspace "$(GOPATH)"
|
||||||
|
|
||||||
dependencies: $(GOCC) | $(SELFLINK)
|
dependencies: $(GOCC) | $(SELFLINK)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue