gpt4 book ai didi

linux - 在 Azure Web App 中跨 docker 重启保留内容

转载 作者:太空狗 更新时间:2023-10-29 11:35:32 25 4
gpt4 key购买 nike

我正在尝试运行 ghost Azure 上 Linux Docker 容器内的 docker 镜像。这非常容易启动和运行 using a custom Docker image for Azure Web App on Linux并将其指向 Ghost 的官方 docker hub 镜像。

不幸的是official docker image将所有数据存储在/var/lib/ghost 路径上,该路径在重新启动后不会保留,因此每当容器重新启动时,我的所有内容都会被删除,最终会回到默认的 Ghost 安装。

Azure 不会让我执行任意命令,您基本上将其指向 docker 镜像,然后它从那里启动,因此我无法使用 -v 命令行参数来映射卷。 docker 镜像确实配置了一个入口点(如果有帮助的话)。

任何建议都会很棒。谢谢!

最佳答案

在 appsettings 中将 WEBSITES_ENABLE_APP_SERVICE_STORAGE 设置为 true,主目录将从外部 kudo 实例映射:

https://learn.microsoft.com/en-us/azure/app-service/containers/app-service-linux-faq

关于linux - 在 Azure Web App 中跨 docker 重启保留内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45862876/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com