def _get_container_image_name(image_reference):
    """
    Get the container image name from an image reference.

    :param str image_reference: the image reference to analyze
    :return: the container image name
    """
    if '@' in image_reference:
        return image_reference.split('@', 1)[0]
    else:
        return image_reference.rsplit(':', 1)[0]