Azure / Azure/azure-functions-docker

mcr.microsoft.com/azure-functions/python:4-python3.11 - /opt/startup/install_ca_certificates.sh not finding any Azure CA certificates as part of startup command

Open
#1,197 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
280
Forks
126
PR merge metrics
No merged PRs in 30d

Description

I have been trying to set up an existing python Azure function application which uses V2 programming setup with blueprints and durable functions.

Under v1 programming, adding `debugpy.listen('0.0.0.0', 5678) at the start of _function_app.py_ works fine and I am able to attach the VS code debugger using remote attach.

Using v2, this doesn't work and I am currently running on the assumption that this is because there isn't a single process that runs all functions given they are split across files. To try to get round this, I am looking to run the host via functions cli (https://github.com/Azure/azure-functions-docker/issues/987#issuecomment-1846724440) as this worked previously.

However, when starting this host in the container this way I get the following error:

![Image](https://github.com/user-attachments/assets/dbceb744-7910-4897-8edf-b6a18901a819)

And when I curl request the extension bundle endpoint:

![Image](https://github.com/user-attachments/assets/a253578f-570a-4a41-9b4e-96f3b54fbf9a)

I believed this was because I wasn't running `/opt/startup/install_ca_certificates.sh` as is run in the base startup command `/opt/startup/startup_nonappservice.sh`, however doing this didn't change anything.

Upon further inspection, this appears to because this shell file isn't actually changing anything in the container as the source folder it is looking for doesn't exist: https://github.com/Azure/azure-functions-docker/blob/3c9f90510e6db9d3f6bbcb85d6b05792b88ce4ed/host/4/bullseye/python/python311/install_ca_certificates.sh#L10

![Image](https://github.com/user-attachments/assets/0ebc7b22-7401-4c59-8f2a-6e8c99f26ffe)

---
When running the main startup command, I am able to run my function app with the built in host but can't attach a debugger. This is what I was trying to do (https://github.com/Azure/azure-functions-python-worker/issues/1301#issuecomment-1694638639).

So my question is iether:

1. How can I setup the CA certificates so that the fucntions cli host can access Azure sites?

or

2. How can I attach the debugger to a v2 python function using blueprints running through the base command?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.