Update our "registry" install to use the included Godeps libraries so that it
doesn't require anything from our current source (hence moving it up for
better caching too)
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
| ... | ... |
@@ -113,6 +113,14 @@ RUN git clone -b buildroot-2014.02 https://github.com/jpetazzo/docker-busybox.gi |
| 113 | 113 |
# Get the "cirros" image source so we can import it instead of fetching it during tests |
| 114 | 114 |
RUN curl -sSL -o /cirros.tar.gz https://github.com/ewindisch/docker-cirros/raw/1cded459668e8b9dbf4ef976c94c05add9bbd8e9/cirros-0.3.0-x86_64-lxc.tar.gz |
| 115 | 115 |
|
| 116 |
+# Install registry |
|
| 117 |
+ENV REGISTRY_COMMIT c448e0416925a9876d5576e412703c9b8b865e19 |
|
| 118 |
+RUN set -x \ |
|
| 119 |
+ && git clone https://github.com/docker/distribution.git /go/src/github.com/docker/distribution \ |
|
| 120 |
+ && (cd /go/src/github.com/docker/distribution && git checkout -q $REGISTRY_COMMIT) \ |
|
| 121 |
+ && GOPATH=/go/src/github.com/docker/distribution/Godeps/_workspace:/go \ |
|
| 122 |
+ go build -o /go/bin/registry-v2 github.com/docker/distribution/cmd/registry |
|
| 123 |
+ |
|
| 116 | 124 |
# Get the "docker-py" source so we can run their integration tests |
| 117 | 125 |
ENV DOCKER_PY_COMMIT aa19d7b6609c6676e8258f6b900dea2eda1dbe95 |
| 118 | 126 |
RUN git clone https://github.com/docker/docker-py.git /docker-py \ |
| ... | ... |
@@ -145,17 +153,6 @@ RUN set -x \ |
| 145 | 145 |
&& git clone -b v1.2 https://github.com/russross/blackfriday.git /go/src/github.com/russross/blackfriday \ |
| 146 | 146 |
&& go install -v github.com/cpuguy83/go-md2man |
| 147 | 147 |
|
| 148 |
-# Install registry |
|
| 149 |
-COPY pkg/tarsum /go/src/github.com/docker/docker/pkg/tarsum |
|
| 150 |
-# REGISTRY_COMMIT gives us the repeatability guarantees we need |
|
| 151 |
-# (so that we're all testing the same version of the registry) |
|
| 152 |
-ENV REGISTRY_COMMIT c448e0416925a9876d5576e412703c9b8b865e19 |
|
| 153 |
-RUN set -x \ |
|
| 154 |
- && git clone https://github.com/docker/distribution.git /go/src/github.com/docker/distribution \ |
|
| 155 |
- && (cd /go/src/github.com/docker/distribution && git checkout -q $REGISTRY_COMMIT) \ |
|
| 156 |
- && go get -d github.com/docker/distribution/cmd/registry \ |
|
| 157 |
- && go build -o /go/bin/registry-v2 github.com/docker/distribution/cmd/registry |
|
| 158 |
- |
|
| 159 | 148 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
| 160 | 149 |
ENTRYPOINT ["hack/dind"] |
| 161 | 150 |
|