Puppeteer Azure Functions on Docker
A base Docker image of an Azure Function App with Puppeteer installed.
Create Puppeteer scripts which can be deployed a web service on Azure.
Runs Azure Functions v3.0 on .NET Core v3.0
Run the Examples
docker pull deniskyashif/puppeteer-azure-func
docker run -p 8080:80 -it deniskyashif/puppeteer-azure-func
Retrieve the title of a page
curl -v http://localhost:8080/api/Examples/Title?url=https://github.com
Take a screenshot of a page
curl -v http://localhost:8080/api/Examples/Screenshot?url=http://github.com -o ./page.png
Download page as a PDF
curl -v http://localhost:8080/api/Examples/Pdf?url=http://github.com -o ./page.pdf
Local Development
Prerequisites
Run the project
func start -p 8080
Add your own functions
func new --name MyFunction --template "HttpTrigger"
PuppeteerSharp API reference.
For building custom images and deploying them on Azure, refer to this article.