Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Azure Functions on Linux

Quick example of using the Azure Serverless Functions framework inside a Docker Container.

Requirements

Runing the sample locally

  • Clone the repository
  • run func start on the command line
  • browse to http://localhost:7071/api/echo - returns Hello from hostname [architecture and processor type]
  • browse to /api/advocates - returns json result of the @azureadvocates list
  • browse to /api/advocates?id=1 - returns individual advocate

Creating a Docker image

When initializing a new function app project, a base Docker image can be added with the --docker option.

func init --docker

The Dockerfile added is very basic:

FROM microsoft/azure-functions-runtime:v2.0.0-beta1
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
COPY . /home/site/wwwroot

Create the image for the project

docker build -t funkylinux .

Run the image and map port 80 to a local port.

docker run -p 3001:80 funkylinux

Browse to the same endpoints on the new url - http://localhost:3001/api/echo

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.