

def _preload_registry_server(self):
    try:
        subprocess.check_call(['docker', 'pull', '{}/binder-base'.format(MainSettings.DOCKER_HUB_USER)])
        subprocess.check_call(['docker', 'tag', '{}/binder-base'.format(MainSettings.DOCKER_HUB_USER), '{}/binder-base'.format(MainSettings.REGISTRY_NAME)])
        subprocess.check_call(['docker', 'push', '{}/binder-base'.format(MainSettings.REGISTRY_NAME)])
        return True
    except subprocess.CalledProcessError as e:
        error_log(self.TAG, 'Could not preload registry server with binder-base image: {}'.format(e))
        return False

dataset/ETHPy150Open binder-project/binder/binder/cluster.py KubernetesManager._preload_registry_server/original