lightning:container and Canvas Apps (which themselves can be embedded into Lightning components using
force:canvasApp) seem to be doing similar things. Both of them allow you to embed external applications into Salesforce, and do it within an iframe. Both allow two-way communication between Salesforce and the application in the iframe. What are the differences between them and how can I decide which one is right for which use case?
lightning:container uses a static resource hosted in Salesforce, while
force:canvasApp allows you to embed any site that uses the Canvas API. The difference is location. The one that you use is the one that makes the most sense. Almost all apps would presumably be better suited as a force:canvasApp, but if all you have is source code (e.g. there's no server), Salesforce can host the application code.