Sync with other Dockerfiles:
1) Adjust REGISTRY_COMMIT
2) Add old shema1 registry
3) Install notary client
This fixes the following testcases:
DockerSchema1RegistrySuite:
- SetUpTest
DockerTrustSuite:
- TestTrustedBuildTagFromReleasesRole
- TestTrustedBuildTagIgnoresOtherDelegationRoles
- TestTrustedPullReadsFromReleasesRole
- TestTrustedPullIgnoresOtherDelegationRoles
- TestTrustedPushWithReleasesDelegationOnly
- TestTrustedPushSignsAllFirstLevelRolesWeHaveKeysFor
- TestTrustedPushSignsForRolesWithKeysAndValidPaths
- TestTrustedPushDoesntSignTargetsIfDelegationsExist
DockerRegistrySuite:
- TestPullManifestList
- TestCrossRepositoryLayerPush
DockerHubPullSuite:
- TestPullAllTagsFromCentralRegistry
v2: Sync comments on all architectures
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
| ... | ... |
@@ -185,7 +185,7 @@ RUN set -x \ |
| 185 | 185 |
go build -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry \ |
| 186 | 186 |
&& rm -rf "$GOPATH" |
| 187 | 187 |
|
| 188 |
-# Install notary server |
|
| 188 |
+# Install notary and notary-server |
|
| 189 | 189 |
ENV NOTARY_VERSION docker-v1.11-3 |
| 190 | 190 |
RUN set -x \ |
| 191 | 191 |
&& export GO15VENDOREXPERIMENT=1 \ |
| ... | ... |
@@ -116,7 +116,7 @@ RUN set -x \ |
| 116 | 116 |
go build -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ |
| 117 | 117 |
&& rm -rf "$GOPATH" |
| 118 | 118 |
|
| 119 |
-# Install notary server |
|
| 119 |
+# Install notary and notary-server |
|
| 120 | 120 |
ENV NOTARY_VERSION docker-v1.11-3 |
| 121 | 121 |
RUN set -x \ |
| 122 | 122 |
&& export GO15VENDOREXPERIMENT=1 \ |
| ... | ... |
@@ -127,7 +127,7 @@ RUN set -x \ |
| 127 | 127 |
go build -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry \ |
| 128 | 128 |
&& rm -rf "$GOPATH" |
| 129 | 129 |
|
| 130 |
-# Install notary server |
|
| 130 |
+# Install notary and notary-server |
|
| 131 | 131 |
ENV NOTARY_VERSION docker-v1.11-3 |
| 132 | 132 |
RUN set -x \ |
| 133 | 133 |
&& export GO15VENDOREXPERIMENT=1 \ |
| ... | ... |
@@ -112,17 +112,24 @@ RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint |
| 112 | 112 |
&& go install -v github.com/golang/lint/golint |
| 113 | 113 |
|
| 114 | 114 |
|
| 115 |
-# Install registry |
|
| 116 |
-ENV REGISTRY_COMMIT ec87e9b6971d831f0eff752ddb54fb64693e51cd |
|
| 115 |
+# Install two versions of the registry. The first is an older version that |
|
| 116 |
+# only supports schema1 manifests. The second is a newer version that supports |
|
| 117 |
+# both. This allows integration-cli tests to cover push/pull with both schema1 |
|
| 118 |
+# and schema2 manifests. |
|
| 119 |
+ENV REGISTRY_COMMIT_SCHEMA1 ec87e9b6971d831f0eff752ddb54fb64693e51cd |
|
| 120 |
+ENV REGISTRY_COMMIT 47a064d4195a9b56133891bbb13620c3ac83a827 |
|
| 117 | 121 |
RUN set -x \ |
| 118 | 122 |
&& export GOPATH="$(mktemp -d)" \ |
| 119 | 123 |
&& git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ |
| 120 | 124 |
&& (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ |
| 121 | 125 |
&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ |
| 122 | 126 |
go build -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ |
| 127 |
+ && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1") \ |
|
| 128 |
+ && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ |
|
| 129 |
+ go build -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry \ |
|
| 123 | 130 |
&& rm -rf "$GOPATH" |
| 124 | 131 |
|
| 125 |
-# Install notary server |
|
| 132 |
+# Install notary and notary-server |
|
| 126 | 133 |
ENV NOTARY_VERSION docker-v1.11-3 |
| 127 | 134 |
RUN set -x \ |
| 128 | 135 |
&& export GO15VENDOREXPERIMENT=1 \ |
| ... | ... |
@@ -131,6 +138,8 @@ RUN set -x \ |
| 131 | 131 |
&& (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION" && ln -s . vendor/src) \ |
| 132 | 132 |
&& GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ |
| 133 | 133 |
go build -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \ |
| 134 |
+ && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ |
|
| 135 |
+ go build -o /usr/local/bin/notary github.com/docker/notary/cmd/notary \ |
|
| 134 | 136 |
&& rm -rf "$GOPATH" |
| 135 | 137 |
|
| 136 | 138 |
# Get the "docker-py" source so we can run their integration tests |