Based on this Dockerfile I'm running Azure Functions runtime inside a Windows container.
I want to bring my own secrets. So I add my own host.json into the runtime\secrets
folder and set the storage type to files
:
host_secret.json:
{
"masterKey": {
"name": "master",
"value": "***fancy-code-for-host-admin-and-keys-api***",
"encrypted": false
},
"functionKeys": [
{
"name": "default",
"value": "***fancy-code-for-functions***",
"encrypted": false
}
]
}
Dockerfile:
....
ADD host_secret.json C:\\runtime\\Secrets\\host.json
ENV AzureWebJobsSecretStorageType=files
....
When starting the container and the function app, it does not respond and shows
Function host is not running.
checking the logs I find
System.UnauthorizedAccessException : Access to the path 'C:\runtime\Secrets\host.json' is denied