This is a simple project to get an Azure function running inside a Docker container. You may want to check my Medium This Readme file will have only the main information.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js - Version 8.5 or higher
- Azure CLI
- .NET Core SDK 2.1
- Azure Functions Core Tools v2
- Docker
- Coffee and good music
Disclaimer: I used Windows 10 Pro for this demostration, but can be replicated on Ubuntu 16.04 or higher. Steps may differ.
Step 1: Initialize an Azure function. This tutorial was done choosing node.js
Initialize Azure Docker function. func init . --docker
Step 2: Create a new function This tutorial was done choosing HTTP trigger template.
Create a new function func new
Step 3: Build and run the container! Build a docker container docker build -t azurefuntiondemo .
Run docker container docker run -p 8080:80 azurefunctiondemo
Step 4: Check your progress! Check link http://localhost:8080 to validate your function is up and running.
- Nicolás Soria - PurpleBooth