I am trying to mount an Azure file share volume to an ACI container group and instance.
C# code snippet
.DefineVolume(volumeMountName)
.WithExistingReadWriteAzureFileShare(shareName)
.WithStorageAccountName(storageAccountName)
.WithStorageAccountKey(storageAccountKey)
.Attach()
.DefineContainerInstance(containerGroupName)
.WithImage($"{acrServer}/{containerImage}:{Constant.ACIVersion}")
.WithExternalTcpPort(80)
.WithVolumeMountSetting(volumeMountName,"/aci/logs/")
.WithCpuCoreCount(1.0)
.WithMemorySizeInGB(1.5)
.WithEnvironmentVariables(envVars)
.Attach()
Above code works fine and it launches the ACI container in Azure.
However, when I try to list the files from within the container , for ex:
Directory.GetFiles("/aci/logs/z-vol/") or Directory.GetFiles("//z-vol//")
I don't get any results, also when I write to this directory location, the new file doesn't reflect in Azure file share in the portal.
What I am missing here? I am running ubuntu image.