Thanks for the Insights @Vivek Vaibhav Shandilya.
The issue was resolved after realizing that environment variables defined in local.settings.json
are not picked up inside a Docker container. This file is only used by the Azure Functions Core Tools (func start
) during local development — not in Docker runtime.
All required environment variables were added directly to the Dockerfile using ENV
, including below.
ENV AzureWebJobsStorage="your-connection-string" \
BlobStorageConnectionString="your-connection-string" \ FUNCTIONS_WORKER_RUNTIME=python \ AzureWebJobsFeatureFlags=EnableWorkerIndexing
Alternatively, you can pass them via the docker run
command.
docker run -p 7071:80 \ -e AzureWebJobsStorage="your-connection-string" \ -e BlobStorageConnectionString="your-connection-string" \ -e FUNCTIONS_WORKER_RUNTIME=python \ -e AzureWebJobsFeatureFlags=EnableWorkerIndexing \ my-func