首页 > 解决方案 > 卷 myvol 指定不存在的驱动程序 azurefile

问题描述

Net 核心应用程序,我正在尝试挂载 azure 文件共享。下面是我的 docker-compose 文件。

version: "3.9"
services:
  mountvolume:    
    container_name: mountvolume
    build:      
      context: .
      dockerfile: ./Dockerfile   
    ports:
      - "8080:80"
    volumes:
       - myvol:/Files/
volumes:
  myvol:
    driver: azurefile
    driver_opts:
      accountname: mystorageaccount28628
      accountkey: 2em0XONHCmgEE9m81Q/O0rTSGXf9giw==
      share: "acishare"
      remotepath: "aci/logs"

我在其中一个存储帐户中手动创建了名为 acishare 的 FileShare。我已经给出了与上面相同的存储帐户的帐户名和密钥。我尝试 docker-compose up 并得到以下错误

ERROR: Volume myvol specifies nonexistent driver azure file

有人可以帮我解决这个错误。同样在上面的卷部分中,我有字段 share 和 remotepath 所以 share 表示文件共享名称,但远程路径到底是什么意思?有人可以帮我弄清楚。任何帮助,将不胜感激。谢谢

标签: dockerdocker-composedocker-volumeazure-storage-account

解决方案


我目前有同样的问题,经过一些研究,似乎 docker 的 azure 文件驱动程序插件已被删除。不过,docker 文档 ( https://docs.docker.com/cloud/aci-integration/ )中仍然提到了它,但驱动程序拼写为azure_file。azure 文件插件的 Github 项目已被放弃https://github.com/Azure/azurefile-dockervolumedriver

据我了解 MS Azure 文档,现在只有在 azure 中部署容器时才能进行集成(https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-天蓝色文件)。


推荐阅读