from typing import List
from typing import Dict


def create_dependencies_json(all_docker_files: List[Dict]) -> Dict:
    """
    Create a dictionary with all the docker images and dependent images.
    Args:
        all_docker_files (List): list of dockerfiles
    Returns:
        {'image name': [dependent dockerfile]}
    """
    dependency_json = {f"{file['repo']}/{file['image_name']}": [] for file in all_docker_files}

    for file in all_docker_files:
        dependency_json[f"{file['repo']}/{file['image_name']}"].append(file)

    return dependency_json