diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2022-03-01 12:34:28 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2022-03-01 12:37:40 +0100 |
commit | cecc22f3b2661548d15b455a7cb5182d9253c748 (patch) | |
tree | 436f4161ec68833d13a2996cf07d0dac51ce353a /build/download | |
parent | b7cec3a41d75bad8087ee0e7ed4a988cfe520b62 (diff) |
[BUILD] Fix docker mirror handling
In case image originates from same repository that is used as a docker
mirror do not try to retag the image (to the same name which would
end with error)
Change-Id: I4c43315d5633e39a347492d2b2065bdddfead6fb
Issue-ID: INT-1429
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'build/download')
-rwxr-xr-x | build/download/docker_downloader.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/build/download/docker_downloader.py b/build/download/docker_downloader.py index c767aa9e..9897325d 100755 --- a/build/download/docker_downloader.py +++ b/build/download/docker_downloader.py @@ -164,9 +164,11 @@ class DockerDownloader(ConcurrentDownloader): if (len(image_name_split) > 1) \ and (image_name_split[0].find(".")) >= 0 \ and not (image_name.startswith('docker.io/')) \ + and not (image_name.startswith(self._mirror)) \ and (image_name_split[0] not in self._mirror_exclude): # if image originates from private registry and its name does not start with 'docker.io' # and it does not originate from excluded registry + # and docker mirror name differs from private registry name # -> download image from docker mirror and retag it to its original name mirrored_image_name = self._mirror + "/" + '/'.join(image_name_split[1:]) img = self._docker_client.images.pull(mirrored_image_name) |