From 469473b31c2a809d35fb0e574aca5d55b48f12f3 Mon Sep 17 00:00:00 2001
From: wang yan <wangyan@vmware.com>
Date: Tue, 9 Apr 2019 18:34:20 +0800
Subject: [PATCH] Patch regsitry v2.7.1 with fix on distribution issue 2819

This commit is to build a regsitry bases on v2.7.1 code and introduces
an fix on issue #2819, this is a P0 bug on v2.7.1 which causes GCS doesn't
work well on v2.7.1

For more details, refer to https://github.com/docker/distribution/pull/2821

Signed-off-by: wang yan <wangyan@vmware.com>
---
 Makefile                               | 2 +-
 make/photon/registry/Dockerfile.binary | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d238cf9ab..b257bce68 100644
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,7 @@ VERSIONFILENAME=UIVERSION
 PREPARE_VERSION_NAME=versions
 
 #versions
-REGISTRYVERSION=v2.7.1
+REGISTRYVERSION=v2.7.1-patch-2819
 NGINXVERSION=$(VERSIONTAG)
 NOTARYVERSION=v0.6.1
 CLAIRVERSION=v2.0.7
diff --git a/make/photon/registry/Dockerfile.binary b/make/photon/registry/Dockerfile.binary
index 41fad81c7..de9aa4bdf 100644
--- a/make/photon/registry/Dockerfile.binary
+++ b/make/photon/registry/Dockerfile.binary
@@ -1,7 +1,7 @@
 FROM golang:1.11
 
 ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
-ENV DOCKER_BUILDTAGS include_oss include_gcs
+ENV BUILDTAGS include_oss include_gcs
 
 WORKDIR $DISTRIBUTION_DIR
 COPY . $DISTRIBUTION_DIR