问题描述
我正在尝试在Azure App Service中运行KrakenD图像.
KrakenD需要将json配置文件krakend.json放入/etc/krakend/(( KrakenD映像基于Linux Alpine )
我为具有以下docker-compose文件的容器创建了Web App:
版本:"3"服务:克拉肯德:图片:devopsfaith/krakend:latest数量:-$ {WEBAPP_STORAGE_HOME}/site/krakend:/etc/krakend端口:-"8080:8080"重启:总是
使用blob容器添加了存储帐户,其中上传了示例kraken.json文件
在应用程序配置中,我添加了如下路径映射:
但是好像没有正确安装卷
其他问题
-
在存储安装中安装路径是什么意思?-我在其中输入了/krankend
-
卷定义以$ {WEBAPP_STORAGE_HOME}开头
I'm trying to run KrakenD image in Azure App Service.
KrakenD requires json config file krakend.json to be put into /etc/krakend/ (KrakenD image is based on Linux Alpine)
I created Web App for containers with the following docker-compose file:
version: "3" services: krakend: image: devopsfaith/krakend:latest volumes: - ${WEBAPP_STORAGE_HOME}/site/krakend:/etc/krakend ports: - "8080:8080" restart: always
Added storage account with a blob container where uploaded sample kraken.json file
In app configuration i added a path mapping like this:
But it looks like volume was not mounted correctly
Additional questions
What does mean Mount path in Storage mounting? - i put there value /krankend
volume definition starts with ${WEBAPP_STORAGE_HOME} in docs they specified it as
volumes: - ${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html
so i did it by analogy and tried all 3 possible paths
${WEBAPP_STORAGE_HOME}/site/wwwroot/krakend ${WEBAPP_STORAGE_HOME}/site/krakend ${WEBAPP_STORAGE_HOME}/krakend
but no luck - still getting the error
解决方案finally resolved that with the following docker-compose file
version: "3" services: krakend: image: devopsfaith/krakend:latest volumes: - volume1:/etc/krakend environment: WEBSITES_ENABLE_APP_SERVICE_STORAGE: TRUE ports: - "8080:8080" restart: always
where volume1 is a blob storage mounted as the following
这篇关于如何在Azure Web App中为容器安装Docker卷?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!