How to use Azure File Share (SMB) from a docker-enabled ASP.NET Core (Web API) project RRS feed

  • Question

  • User-148029165 posted

    I started a couple of days ago trying to accomplish something that seemed to be very easy, but it turned out to be very unclear and complex. Hence, hoping someone has a good answer.

    This is what I've done:

    • Created a ASP.NET Core 2.0 Web Application (Web API) project in Visual Studio.
    • Enabled Docker support (which created Dockerfile, and the docker-compose project).
    • Published it successfully to Azure with the "App Service Linux" publish profile.
    • Created a Azure File Share and successfully mapped that on my windows pc and added some files.

    Now I want to access this file share from my web application. However, I can't find any solution how to access this share, or how to add this share as a volume in my Docker container, so that I can access it with SMB. I've read Use Azure Files with Linux as well as Docker Volume Driver for Azure File Storage and Persisting connections to Microsoft Azure Files, but none of them gives an answer on how to configure my Dockerfile or docker-compose to map my share. Neither gives it a clue on how to do it after deployment to Azure.

    The Docker container created when publishing from Visual Studio does not have SSH included, neither is it installed in a swarm which seems to be required if you want to use Cloudstor.


    Friday, March 16, 2018 7:35 AM

All replies