Azure Function Container - Could not create BlobContainerClient for ScheduleMonitor

Pie 246 Reputation points
2022-08-24T05:09:20.847+00:00

I have a Azure Function (Linux Container) that I am trying to run locally.

I have a Dockerfile that loads in all the code.

Here is the base image:

FROM mcr.microsoft.com/azure-functions/python:4-python3.8  

After I pull the container from Docker Hub and remote into it, I go to the function root directory and run func start. I then get the below error. This container runs perfectly fine in Azure Cloud when deployed since its using whatever the cloud storage container is (not sure how that bit is configured but not important right now).

Here is the error:

The listener for function 'Functions.TimerTrigger_XXX' was unable to start.  
The listener for function 'Functions.TimerTrigger_XXX' was unable to start. Microsoft.Azure.WebJobs.Extensions.Timers.Storage: Could   
not create BlobContainerClient for ScheduleMonitor.  

Is there some Storage Emulator that needs to be installed inside the container for local debugging purposes?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,262 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,421 Reputation points
    2022-08-29T07:44:23.46+00:00

    @Pie ,

    You will have to configure the storage account in order to run locally. Please run the below command and try starting the function

    docker run -p 8080:80 -it -e AzureWebJobsStorage="{connection-string}" <docker-id>/mydockerimage:v1.0.0

    https://github.com/Azure/azure-functions-docker-python-sample#configure-storage

    0 comments No comments