def METHOD_NAME(dockerfile):
    """Given a path to the dockerfile, use the Docker API to build the
    container image and extract the image into a working directory. Return
    true if this succeeded and false if it didn't"""
    image_metadata = None
    # open up a client first
    # if this fails we cannot proceed further so we will exit
    client = check_docker_setup()
    image = build_image(dockerfile, client)
    if image:
        # the build succeeded, so we should be able to extract it
        if extract_image(image):
            image_metadata = image.attrs
            remove_image(image, client)
    else:
        # we didn't succeed building the image
        logger.warning("Could not build Docker image")
    close_client(client)
    return image_metadata