import yaml


def create_blacklist(config_file):
    """
    Generate a list of images which needs to be excluded from docker_image_list
    :param config_file: application_configuration file where images are.
    :return:
    """
    with open(config_file, 'r') as f:
        file = yaml.load(f, Loader=yaml.SafeLoader)

        blacklist=[]
        for name, _ in file['runtime_images'].items():
            path = file['runtime_images'][name]['path']
            blacklist.append(path[1:])
    return blacklist