首页 > 解决方案 > python - 如何使用docker从我的机器发布天蓝色函数到天蓝色?

问题描述

当我尝试在 python 中将我的 azure 函数发布到 azure 时,我收到以下错误。

pip version 10.0.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
ERROR: cannot install cryptography-2.7 dependency: binary dependencies without wheels are not supported.  Use the --build-native-deps option to automatically build and configure the dependencies using a Docker container. More information at https://aka.ms/func-python-publish

所以,我已经安装了 docker,并尝试使用以下命令推送我的功能

func azure functionapp 发布 timertriggerforstreaming --build-native-deps

我什么都没做,我刚刚安装了 docker,当我尝试发布时,当我在 windows 容器上使用 docker 时出现以下错误(我的机器是 windows 10)。

Error running docker pull mcr.microsoft.com/azure-functions/python:2.0.12493-python3.6-buildenv.
output: 2.0.12493-python3.6-buildenv: Pulling from azure-functions/python
image operating system "Linux" cannot be used on this platform

我再次从 Windows 切换到 Linux 并再次尝试相同的方法,这需要很长时间,而且我看到以下输出很长一段时间。 看图片 是我做对还是错的方式,或者我需要自己Dockerize azure函数并发布它

标签: python-3.xdockerazure-functionsazure-eventhubazure-functions-core-tools

解决方案



推荐阅读