Docker containers for Azure Functions
There are some particular quirks when it comes to building a container image for an Azure function. Where normally we can simply containerize the code we have built, for containers in Azure Functions apps, we have to follow some specific constructs. We have to implement the code as if we were writing an Azure function.
Now, that might sound like a very complicated thing to do, but in reality, it’s not that hard. We can use tools such as the Azure Functions Core Tools to generate the base code for our function, the Dockerfile, and add our own custom code to the function to get started.
Important note
In the previous example, we built the container image for you to get started and test. To follow the code in this chapter, you will not have to do any of the following we are about to explain. However, if you are taking this to production, it’s important to understand the basics.
To get started, we need the Azure Functions...