5

Net core application and I am trying to mount azure file share. Below is my docker-compose file.

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"

I have manually created FileShare named acishare in one of the storage account. I have given account name and key of the same storage account as above. I tried to docker-compose up and got below error

ERROR: Volume myvol specifies nonexistent driver azure file

Can someone help me to fix this error. Also in the above volume section I have fields share and remotepath so share means fileshare name but what is exactly remote path means? Can someone help me to figure it out. Any help would be appreciated. Thanks

Mr Perfect
  • 585
  • 8
  • 30
  • I am still facing the issue. No change in the documentation anywhere pointing that this should be working. Any update on this? – Benison Sam Jul 21 '22 at 11:50

2 Answers2

1

I currently have the same issue and after doing some research, it seems like the azure files driver plugin for docker has been removed. It is still mentioned in the docker documentation (https://docs.docker.com/cloud/aci-integration/), though, but with the driver spelled azure_file. The Github project for the azure files plugin has been abandoned https://github.com/Azure/azurefile-dockervolumedriver.

As far as I understand the MS Azure documentation, integration is now only possible if you also deploy your container in azure (https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files).

Dharman
  • 30,962
  • 25
  • 85
  • 135
Baume
  • 31
  • 6
0

First change driver to driver: local, and let compose create the volume. Then switch it back to driver: azure_file.

You don't need to specify account key. You only need storage_account_name and share_name.

volumes:
  couchdb_data:
    # set to "local" first
    # driver: local
    # after you see the volume in docker volume ls set
    driver: azure_file
    driver_opts:
      storage_account_name: <yourstorageaccountname>
      share_name: <yoursharename>
Ate Somebits
  • 287
  • 1
  • 18