卷 myvol 指定不存在的驱动程序 azurefile

Mr *_*ect 5 docker docker-compose docker-volume azure-storage-account

Net core 应用程序,我正在尝试挂载 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"
Run Code Online (Sandbox Code Playgroud)

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

ERROR: Volume myvol specifies nonexistent driver azure file
Run Code Online (Sandbox Code Playgroud)

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

小智 1

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

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