Azure functions always using Python 3.6.5 when using a custom Docker image
We have several Python Azure functions that use a custom Docker image because we use a native library that is not in the standard image.
The Docker image we use is based on mcr.microsoft.com/azure-functions/python:3.0-python3.9-appservice. In that image the default Python version is 3.8.12 (obtained with docker run videosearch:v2 python --version).
However, whenever we try to publish a new version of the code, Python 3.6.5 is used instead:
func azure functionapp publish dt-loj-vi-qr-function-app-uspklrodz4yzi --python
Your functionapp is using a custom image DOCKER|dtcontainerregister.azurecr.io/videosearch:v2.
Assuming that the image contains the correct framework.Getting site publishing info... Creating archive for current directory... Performing remote build for functions project. Deleting the old .python_packages directory Uploading 1.29 MB [###############################################################################] Remote build in progress, please wait... Updating submodules. Preparing deployment for commit id '299ec074ce'. Repository path is /tmp/zipdeploy/extracted Running oryx build... Command: oryx build /tmp/zipdeploy/extracted -o /tmp/build/expressbuild --platform python --platform-version 3.6 -i /tmp/8d9d1ea554032af -p packagedir=.python_packages/lib/pytho n3.6/site-packages Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues Oryx Version: 0.2.20210826.1, Commit: f8651349d0c78259bb199593b526450568c2f94a, ReleaseTagName: 20210826.1 Build Operation ID: |PHef1wbFaVM=.85283b8_ Repository Commit : 299ec074ce3b42d5981ce36c95dcc769 Detecting platforms... Detected following platforms: python: 3.6.15 Warning: An outdated version of python was detected (3.6.15). Consider updating.\nVersions supported by Oryx: https://github.com/microsoft/Oryx
We tried setting the pythonVersion attribute of the Function App (we create it using bicep templates) but it seems that when we set the linuxFxVersion attribute (needed to use the Docker image) it is ignored.
Is there a way of using a Docker image but use a different Python version? Thanks in advance