def get_base_image(version_map, version):
    """Selects the appropriate base image from the version map.

    This function takes into account the .NET Core versioning story to
    determine the appropriate base image for the given version. It
    will select from within the same major version and only if the
    minor version is >= than the required image.

    Note that this function assumes that the version_map is sorted
    according to the priority order of the versions.

    Args:p
        version_map: The container of all supported minor versions.
        version: The requested version string.

    Returns:
        The Docker image to use as the base image, None if no image
        could be found.

    """
    for entry in version_map:
        if entry.supports(version):
            return entry
    return None