Windows container fails to reach Azure File Storage

I have a c# web application running on IIS in a windows server core container.
In the dockerfile I create a new user ‘myUser’ without password.
I add the credentials to my Azure File store in the Dockerfile as well:

USER myUser
RUN powershell "cmdkey / /user:AZURE\mystore /pass:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX=="

I add a new application pool Identity using ‘myUser’, and use that application pool for my application.
When I start the container and connect using ‘docker exec’, I am logged on as the new user.
I can access the path with ‘ls \\dockerstore\’
The credentials are listed okay with ‘cmdkey /list’.

  • How to connect a mesos-slave (docker) to a mesos-master (vagrant)
  • Self hosted kibana 5.1.1 showing blank pages after connected to AWS Elasticsearch 5.1.1
  • How to delete the HDFS data in Docker containers
  • Get environment variable value in Dockerfile
  • What's the point of data-only docker containers?
  • How to see commit message from docker images
  • However, my application which runs under the same user complaints it cannot reach the store. System.IO.IOException reported on Directory.Exists().

    I have done this execise on my local box as well, and the application runs without issues.
    I have tried using a user with password as well, to no avail.
    The application use the full UNC-path to the store.

    Tried the same thing on a windows service application. Same thing: Can list files in a powershell session, but my application cannot access it.

    Am I missing something?

    Edit: Here’s what I did:

    NET USER myAzureFilesUser myAzureFilesPasswordXXXXXXXXXXX== /add /y
    NET LOCALGROUP Administrators /add myAzureFilesUser 
    Import-Module WebAdministration
    $processModelProperties = @{userName='myAzureFilesUser ';password='myAzureFilesPasswordXXXXXXXXXXX==';identitytype=3}
    Set-ItemProperty (Join-Path 'IIS:\AppPools\' 'My AppPool Name') -name processModel -value $processModelProperties

  • how does docker treat child process when we send stop to pid 1
  • Docker using gosu vs USER
  • Unable to Install PHP Zip Module via Docker Build
  • Configure uwsgi and nginx using Docker
  • Docker: Can a secret created and deleted in a single RUN command be recovered from the resulting image?
  • Simple HTTP proxy / routing for my docker containers?
  • One Solution collect form web for “Windows container fails to reach Azure File Storage”

    You need to create local user account with the same username and password as Azure File storage account and perform some additional tasks as described here.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.