I have been thinking about use cases for Docker for quite some time. In my opinion, it's an over-hyped technology (like so many new and shiny technologies at the moment). I do however believe that it becomes relevant when you want to run very specific workloads at irregular intervals and need these workloads to be able to scale quickly and cheaply. So, I now have three very interesting use cases, as well as an implementation strategy that leverages Azure.
VSTS Build Agents - Being a Dynamics Partner, we still build many plugins and integrations, and these rely heavily on the CRM Context and Generated Entities. As we move towards greater DevOps capability, it seems reasonable to want to ensure that the entities used in an application or plugin are the latest entities and therefore part of the build pipeline should refresh the generated entities. Enter Docker Containers. By using a Docker VSTS Agent Image (https://www.jamessturtevant.com/posts/Using-the-VSTS-Docker-Agent/) the image is quickly invoked, and can execute your funky custom build activities. There will be some additional work involved, deploy CRM SDK, Entity Build configuration, etc., but in principal, this will work.
Custom Excel Services Host - One of our (potential) customers sends out monthly reports in Excel format. To generate a report in Excel is generally a mess, as you need the Excel App installed and all kinds of funny things. This will obviously not fly on an Azure App service. But, enter Docker! (Whooshing Superman sounds) So, build your very special custom docker image (probably on a Windows Nano Server) with all your Excel and other Apps and voila, problem solved!
SQL Server Reporting Services - Azure SQL does not offer a deployment of SSRS, but thanks to Docker, one could spin up an instance of SSRS, produce any needed reports, and then let it all go again. https://hub.docker.com/r/microsoft/mssql-server-windows-express/ SQL Express with Advanced Services supports SSRS which should be sufficient for most scenarios, and SQL Express is also free, so no licensing risk.
Finally, how to make magic in Azure. One of the things I love most about Azure is the serverless components. Ideally, everything in an Azure deployment should be serverless, and there should simply not be any VMs. This isn't often the case, but if that is the stated goal, then how does one deploy Docker images in Azure, in a serverless manner? The first option for deploying Docker is Azure Container Services (AKS - https://azure.microsoft.com/en-us/services/container-service/ - No idea why the "K", if I remember I'll ask someone – edit – K = Kubernetes). This however deploys a Linux VM to host the Kubernetes infrastructure, so what's the point? I may as well deploy a VM directly. The next option, and by far the sexiest I've found to date, is Azure Container Instances (https://azure.microsoft.com/en-us/services/container-instances/). Enter serverless Docker deployments. Point it at your Docker Image Repository (look at Azure Container Registry - https://docs.microsoft.com/en-us/azure/container-registry/container-registry-intro) and voila. Suddenly it costs you cents to run a docker image. This is what serverless compute is all about!
So, how, why and when to use Docker. I think that about covers it. Mind = Blown!