'Job rules can pass this function a job, job_wrapper, or tool and
determine if the underlying tool believes it can be containered.'

def supports_docker(self, job_or_tool):

    if hasattr(job_or_tool, 'containers'):
        tool = job_or_tool
    elif hasattr(job_or_tool, 'tool'):
        tool = job_or_tool.tool
    else:
        tool = self.app.toolbox.get_tool(job_or_tool.tool_id, tool_version=job_or_tool.tool_version)
    import galaxy.tools.deps.containers
    tool_info = galaxy.tools.deps.containers.ToolInfo(tool.containers, tool.requirements, tool.requires_galaxy_python_environment)
    container_description = self.app.container_finder.find_best_container_description(['docker'], tool_info)
    return (container_description is not None)
