27
votes

I just deployed a web app (node.js container and mongo container) using Azure multi-container instances. It's a bit like Docker Compose but works with an Azure specific yaml file: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-multi-container-yaml

Now I see that there is something called "Azure Web App for Containers". This seems to work with a real docker compose yaml file.

Other than the configuration file format, are there any other differences?

Note: I'm talking about Azure container instances, not Azure container services.

3

3 Answers

22
votes

Well, azure container instances bill you only for the time container is active, while webapp bill you for the time webapp exists (so all the time). that is one of the biggest differences between those.

But overall, I'd say Azure Web App for Containers is just a shortcut to run containers on existing "stuff". I've recently learned that Azure Web App for Containers offer kubernetes capabilities, so these 2 services evolve in a slightly different directions. Azure Web App for Containers is targeted at long running stuff (always running) while ACI are aimed at scheduled\burstable\short lived workloads (similar to Azure Functions).

4
votes

Another difference, in addition to the other answer, is that Web App for Containers offers "slots" with which you can run multiple images on the same allocated resources to help increase utilization. As container instances bill per time used, they do not have "slots".

4
votes

Found this link with MS-staff answer.

In summary

Container for Webapps

  • Recommended if you are already familiar with the Azure Web App environment.
  • Best if you have one or a few long-running containers/services that are being deployed.
  • Can use a custom Docker image to run your web app on an application stack that is not already defined in Azure

Azure Container Instances

  • "Azure Container Instances is a great solution for any scenario that can operate in isolated containers, including simple applications, task automation, and build jobs"
  • A fast, light-weight and easy way of running containers Billed for the time your container is active (billing is based on seconds, cores and memory)
  • Can start containers in Azure in seconds, without the need to provision and manage VMs.
  • Can also work with Kubernetes through an experimental ACI to Kubernetes connector
  • Currently, the fastest way to deploy containers on Azure
  • Based on the Azure docs, " Azure Container Instances guarantees your application is as isolated in a container as it would be in a VM."