From 8db570e797daad12a8f2c6691fef884ac3d9d324 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Fri, 22 May 2015 16:45:25 -0400 Subject: [PATCH] Remove distribution source code from /go/src We already vendor distribution under ./vendor, but because the GOPATH is /go:/go/src/github.com/.../vendor Go will always compile the source code at /go not in ./vendor. Apart from the fact that it is very inconvenient during development, it was also a time-bomb: someone vendors a fix from upstream distribution, but forgets to update REGISTRY_COMMIT in the Dockerfile, and the binary doesn't get the fix. Signed-off-by: Tibor Vass Upstream-commit: 2b0b0c4b97596314b4b1d3960158cc4bcad4067b Component: engine --- components/engine/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index b00da2adaa..a6345dcc8e 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -126,7 +126,8 @@ RUN set -x \ && git clone https://github.com/docker/distribution.git /go/src/github.com/docker/distribution \ && (cd /go/src/github.com/docker/distribution && git checkout -q $REGISTRY_COMMIT) \ && GOPATH=/go/src/github.com/docker/distribution/Godeps/_workspace:/go \ - go build -o /go/bin/registry-v2 github.com/docker/distribution/cmd/registry + go build -o /go/bin/registry-v2 github.com/docker/distribution/cmd/registry \ + && rm -rf /go/src/github.com/docker/distribution/ # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT 91985b239764fe54714fa0a93d52aa362357d251