admin管理员组文章数量:1123187
This is the Dockerfile I am using to start the Function App. It works perfectly in the local environment with Docker. However, when deployed to Azure Functions, the app fails to start. The container logs indicate a timeout issue, even though the implementation is running successfully within the Docker container. Refer to the attached screenshot for more details.
Error: .png
FROM ubuntu:22.04
RUN apt update && apt install -y python3.11
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
RUN apt install -y ttf-mscorefonts-installer
RUN apt install -y python3-pip
RUN apt install -y wget
RUN python3.11 -m pip install pillow
RUN python3.11 -m pip install --upgrade pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2
RUN update-alternatives --auto python3
RUN wget .1_1.1.0g-2ubuntu4_amd64.deb
RUN dpkg -i ./libssl1.1_1.1.0g-2ubuntu4_amd64.deb
RUN rm -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
RUN wget -q .04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt update
RUN apt install azure-functions-core-tools-4
RUN rm -i packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y curl apt-transport-https lsb-release gnupg
# Install Azure CLI
RUN curl -sL | bash
######
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
COPY requirements.txt /
RUN pip install -r /requirements.txt
COPY . /home/site/wwwroot
WORKDIR /home/site/wwwroot
CMD ["func", "host", "start", "--port", "8080"]
版权声明:本文标题:python - Unable to Trigger HTTP Endpoint in Azure Function Deployed with Ubuntu Docker Image - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736554213a1944554.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论