@lru_cache()<EOL>def image_needs_pushing(image):
d = docker_client()<EOL>try:<EOL><INDENT>d.images.get_registry_data(image)<EOL><DEDENT>except docker.errors.APIError:<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
Return whether an image needs pushing

    Args:

    image (str): the `repository:tag` image to be build.

    Returns:

    True: if image needs to be pushed (not on registry)
    False: if not (already present on registry)