in tools/ci_build/get_docker_image.py [0:0]
def container_registry_has_image(full_image_name, docker_path):
env = os.environ.copy()
env["DOCKER_CLI_EXPERIMENTAL"] = "enabled" # needed for "docker manifest"
proc = run(
docker_path, "manifest", "inspect", "--insecure", full_image_name,
env=env, check=False, quiet=True)
image_found = proc.returncode == 0
# log.debug("Image {} in registry".format("found" if image_found else "not found"))
return image_found