Signed-off-by: Alexander Morozov <lk4d4@docker.com>
| ... | ... |
@@ -148,6 +148,17 @@ RUN set -x \ |
| 148 | 148 |
&& git clone -b v1.2 https://github.com/russross/blackfriday.git /go/src/github.com/russross/blackfriday \ |
| 149 | 149 |
&& go install -v github.com/cpuguy83/go-md2man |
| 150 | 150 |
|
| 151 |
+# Install registry |
|
| 152 |
+COPY pkg/tarsum /go/src/github.com/docker/docker/pkg/tarsum |
|
| 153 |
+# REGISTRY_COMMIT gives us the repeatability guarantees we need |
|
| 154 |
+# (so that we're all testing the same version of the registry) |
|
| 155 |
+ENV REGISTRY_COMMIT 21a69f53b5c7986b831f33849d551cd59ec8cbd1 |
|
| 156 |
+RUN set -x \ |
|
| 157 |
+ && git clone https://github.com/docker/distribution.git /go/src/github.com/docker/distribution \ |
|
| 158 |
+ && (cd /go/src/github.com/docker/distribution && git checkout -q $REGISTRY_COMMIT) \ |
|
| 159 |
+ && go get -d github.com/docker/distribution/cmd/registry \ |
|
| 160 |
+ && go build -o /go/bin/registry-v2 github.com/docker/distribution/cmd/registry |
|
| 161 |
+ |
|
| 151 | 162 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
| 152 | 163 |
ENTRYPOINT ["hack/dind"] |
| 153 | 164 |
|