Browse code

Sync changes for registry and notary

Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>

Stefan Scherer authored on 2016/01/14 09:46:35
Showing 1 changed files
... ...
@@ -127,24 +127,33 @@ RUN set -x \
127 127
 	) \
128 128
 	&& rm -rf "$SECCOMP_PATH"
129 129
 
130
-# Install registry
131
-ENV REGISTRY_COMMIT ec87e9b6971d831f0eff752ddb54fb64693e51cd
130
+# Install two versions of the registry. The first is an older version that
131
+# only supports schema1 manifests. The second is a newer version that supports
132
+# both. This allows integration-cli tests to cover push/pull with both schema1
133
+# and schema2 manifests.
134
+ENV REGISTRY_COMMIT_SCHEMA1 ec87e9b6971d831f0eff752ddb54fb64693e51cd
135
+ENV REGISTRY_COMMIT a7ae88da459b98b481a245e5b1750134724ac67d
132 136
 RUN set -x \
133 137
 	&& export GOPATH="$(mktemp -d)" \
134 138
 	&& git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \
135 139
 	&& (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \
136 140
 	&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \
137 141
 		go build -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \
142
+	&& (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1") \
143
+	&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \
144
+		go build -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry \
138 145
 	&& rm -rf "$GOPATH"
139 146
 
140 147
 # Install notary server
141
-ENV NOTARY_COMMIT f211b1826dde5fc8c117ccff9bb04ae458a8e3d0
148
+ENV NOTARY_VERSION docker-v1.10-2
142 149
 RUN set -x \
143 150
 	&& export GOPATH="$(mktemp -d)" \
144 151
 	&& git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \
145
-	&& (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_COMMIT") \
152
+	&& (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \
146 153
 	&& GOPATH="$GOPATH/src/github.com/docker/notary/Godeps/_workspace:$GOPATH" \
147 154
 		go build -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \
155
+	&& GOPATH="$GOPATH/src/github.com/docker/notary/Godeps/_workspace:$GOPATH" \
156
+		go build -o /usr/local/bin/notary github.com/docker/notary/cmd/notary \
148 157
 	&& rm -rf "$GOPATH"
149 158
 
150 159
 # Get the "docker-py" source so we can run their integration tests