简体   繁体   English

Azure 应用服务启动命令在 docker 容器上不起作用

[英]Azure App Service startuop command isn't working on a docker container

I'm using the Azure AppService version of WordPress. This version uses the wordpress-alpine-php docker image, running nginx version 1.20.2.我使用的是WordPress的Azure AppService版本。这个版本使用wordpress-alpine-php docker镜像,运行nginx版本1.20.2。

I need to run a startup script.我需要运行启动脚本。 I've followed all the documentation but it's not working.我已经按照所有文档进行操作,但它不起作用。

I added the script as a startup command on the general settings tab of the configuration blade.我在配置刀片的常规设置选项卡上将脚本添加为启动命令。

UPDATE: There is no error in the docker logs.更新: docker 日志中没有错误。 在此处输入图像描述 在此处输入图像描述

In the log stream, I see it applies this startup command to the docker command (at the end).在日志 stream 中,我看到它将此启动命令应用于 docker 命令(最后)。

2023-01-28T15:47:13.502Z INFO - docker run -d --expose=80 --name doublekblog_53_90b5e145 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=true -e WEBSITE_SITE_NAME=doublekblog -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=doublekblog.azurewebsites.net -e WEBSITE_INSTANCE_ID=a6aeecea0459d3f037d6e8e066c862b9ee22384acef65d19b8cae7b67921b742 -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/appsvc/wordpress-alpine-php:stage3 /home/site/repository/movedefaultconf.sh 2023-01-28T15:47:13.502Z 信息 - docker run -d --expose=80 --name doublekblog_53_90b5e145 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=true -e WEBSITE_SITE_NAME=doublekblog -e WEBSITE_AUTH_LE WEBSITE_LE WEBSITE_ENABLED=8IDFalse -e -e WEBSITE_HOSTNAME=doublekblog.azurewebsites.net -e WEBSITE_INSTANCE_ID=a6aeecea0459d3f037d6e8e066c862b9ee22384acef65d19b8cae7b67921b742 -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/appsvc/wordpress-alpine-php:stage3 /home/site/repository/movedefaultconf.sh

This script never runs.该脚本永远不会运行。

The script works when I run it manually.该脚本在我手动运行时有效。 As a test, I changed the script to create a file and that didn't work.作为测试,我更改了脚本以创建一个文件,但没有成功。 I even updated the startup command in azure to only touch a file and that didn't seem to be applied.我什至将 azure 中的启动命令更新为仅触摸一个文件,但似乎没有应用。

Please check that the environment variables are correctly set, that the image version exists and the ports are reachable and open.请检查环境变量是否设置正确,镜像版本是否存在,端口是否可达并打开。 Also, you should check the logs of the container and Azure App Service for more information.此外,您应该检查容器的日志和 Azure 应用服务以获取更多信息。 This is for your reference: https://geeksnewslab.com/the-azure-app-service-startup-command-issue-while-using-the-docker-container/这个供大家参考: https://geeksnewslab.com/the-azure-app-service-startup-command-issue-while-using-the-docker-container/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 0 function 在 Azure 应用程序服务自定义 docker 容器中加载错误 - 0 function loaded error in Azure app service custom docker container 在 Azure App Service 问题上部署 Docker Container Registry - Deploying Docker Container Registry on Azure App Service Issue docker-compose 不适用于 Azure 应用服务 - docker-compose not working on Azure App Service Azure 应用服务无法启动 w/ Azure 容器注册表拉取 - Docker 容器 - 找不到文件 - 与 Docker 集线器一起使用 - Azure App Service Fails to Start w/ Azure Container Registry Pull - Docker Container - Can not Find File - Works with Docker Hub 为什么 Task.Delay 不能在 Azure Function 应用程序中运行? - Why isn't Task.Delay working in an Azure Function App? 如何从 Azure 容器应用服务使用 Azure ACR 进行身份验证 - How to authenticate with Azure ACR from Azure container app service Azure 应用服务 linux 忽略自定义命令 - Azure app service linux custom command ignored 用于 Azure 应用程序服务的基于 MongoDb 的容器 - MongoDb based container for Azure app service Signalr 中的 azure 应用程序服务不适用于 websockets - Signalr in azure app service not working for websockets 在 Azure web 应用程序中运行 docker 容器:未响应端口上的 HTTP ping - Running a docker container in Azure web app: didn't respond to HTTP pings on port
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM