def get_base_docker_image(docker_file):
    """ Returns the name of the base image given a path to a docker file.
    """
    with open(docker_file) as f:
        from_line = next(
            line for line in f.read().split("\n") if line.startswith("FROM")
        )
    _from, base_image = from_line.split()
    return base_image