+-
在Azure App Service中使用docker容器时装入卷
我在Azure上部署了一个Web应用程序,并使用公共注册表中的Docker容器(我自己的图像)来托管我的网站.但是用户可以上传图片,数据存储在服务器上的json文件中.当然,我想将这些文件写入容器外部的已安装卷.这样我就可以重新部署我的网站的更新版本而不会丢失数据.

这可能与Web Apps有关吗?或者我是否需要在Azure上使用Docker转移到Ubuntu VM?我喜欢的webapps是我不必担心管理VM而只关心我的容器.

最佳答案
这篇博文是一个很好的开始,并了解Azure有关卷安装的策略(ASL == App Services on
  Linux的; ASW = Windows上的应用服务):

… However, in this case, we would like to leverage the regular App Service Filesystem, so we can interact with the application using FTP. When a container is deployed, ASL mounts the equivalent of D:\home path on ASW to /home (using volume mount in Docker). Now when that happens, it is up to your container to map the corresponding paths into the application. In order to understand how this works more closely, take a look at the official Dockerfile used in PHP7 container on ASL.

https://hajekj.net/2016/12/25/building-custom-docker-images-for-use-in-app-service-on-linux/

点击查看更多相关文章

转载注明原文:在Azure App Service中使用docker容器时装入卷 - 乐贴网