Unable to connect to Storage Account via Container, getting Error: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot

Sherwin Fernandes 0 Reputation points
2023-07-13T04:59:41.9733333+00:00

I have an Azure Durable Function in Python which I wanted to Containerize. I have used the following Image in the following Dockerfile:

FROM mcr.microsoft.com/azure-functions/python:4-python3.10
ENV AzureWebJobsScriptRoot=/home/site/wwwroot AzureFunctionsJobHost__Logging__Console__IsEnabled=true
ENV AzureWebJobsStorage="
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,999 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 14,146 Reputation points Microsoft Employee
    2023-08-02T21:48:50.3366667+00:00

    @Sherwin Fernandes It seems like you are facing an issue while connecting to Azure Storage Account via Docker Container. The error message suggests that the SSL certificate is not valid.

    One possible solution is to add the root certificate to the trusted root store of the container. You can do this by adding the following command to your Dockerfile:

    RUN update-ca-certificates
    

    This command will update the trusted root store of the container with the latest root certificates.

    Another possible solution is to disable SSL verification in your code. However, this is not recommended as it can compromise the security of your application.

    You can also try using a different image that has the necessary root certificates installed. You can search for such images on Docker Hub or other container registries.

    If the above solutions do not work, please reply here so we can assist you further.

    0 comments No comments