Part 2 of a basic series covering ASP.NET, Docker and Azure. This part is independent of what we did with ASP.NET in part 1, and serves as a guide on getting Docker running in Azure. I’m not going to cover the basics of Docker or an introduction into why containerization is a Good Thing™ there’s a million other posts & articles out there on those topics
Docker on Azure
As you might imagine we have a wide range of options when it comes to using Docker on the Azure platform, the main approaches are:
- Docker compute instances. e.g. Docker on Ubuntu Server available in the Azure Marketplace. This boils down to a VM with Docker Engine pre-installed. A bit simple but great for experimenting with what Docker can provide.
- Docker VM Extension. This is a neat way of deploying Docker onto any Linux VM you create in Azure. This works particularly well when you are dealing with ARM templates letting you automate the whole process in an IaaC approach.
- Azure Container Service (ACS). This allows you to deploy a managed Docker cluster in Azure, using a choice of DC/OS or Docker Swarm to provide orchestration and clustering. This is great for production workloads, but a little overkill for what we need.
- Windows Server 2016. What? Docker on Windows? Well yes we’ve had Docker support on Windows for a while but it’s been a bit of a cludge using Hyper-V and a hidden VM running behind the scenes. Yuk. However Windows Server 2016 brings real, native Docker container support to Windows.
- Azure Docker Machine Driver. Docker Machine is a great tool for managing, deploying and controlling remote Docker hosts. It’s a lightweight, command line based system which we’ll focus on in the rest of this post