title: How to mount docker volume in Azure Web App for containers?
body: <p>I'm trying to run KrakenD image in Azure App Service. </p>
  
  <p>KrakenD requires json config file krakend.json to be put into /etc/krakend/ (<em>KrakenD image is based on Linux Alpine</em>)</p>
  
  <p>I created Web App for containers with the following docker-compose file:</p>
  
  <pre><code>version: "3"
  services:
    krakend:
      image: devopsfaith/krakend:latest
      volumes:
        - ${WEBAPP_STORAGE_HOME}/site/krakend:/etc/krakend
      ports:
        - "8080:8080"
      restart: always
  </code></pre>
  
  <p>Added storage account with a blob container where uploaded sample kraken.json file
  <a href="https://i.stack.imgur.com/2sjoK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2sjoK.png" alt="enter image description here"></a></p>
  
  <p>In app configuration i added a path mapping like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Vj0gQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vj0gQ.png" alt="enter image description here"></a></p>
  
  <p>But it looks like volume was not mounted correctly </p>
  
  <blockquote>
    <p>2019-11-15 12:46:29.368 ERROR - Container create failed for
    krakend_krakend_0_3032a936 with System.AggregateException,  One or
    more errors occurred. (Docker API responded with status
    code=InternalServerError, response={"message":"invalid volume
    specification: ':/etc/krakend'"} ) (Docker API responded with status
    code=InternalServerError, response={"message":"invalid volume
    specification: ':/etc/krakend'"} ) InnerException:
    Docker.DotNet.DockerApiException, Docker API responded with status
    code=InternalServerError,  response={"message":"invalid volume
    specification: ':/etc/krakend'"}</p>
    
    <p>2019-11-15 12:46:29.369 ERROR - multi-container unit was not started
    successfully</p>
  </blockquote>
  
  <p>Additional questions</p>
  
  <ol>
  <li><p>What does mean <strong>Mount path</strong> in Storage mounting? - i put there value <em>/krankend</em>  </p></li>
  <li><p>volume definition starts with ${WEBAPP_STORAGE_HOME} <a href="https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-multi-container-app#modify-configuration-file" rel="nofollow noreferrer">in docs</a> they specified it as </p>
  
  <p>volumes:
        - ${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html</p></li>
  </ol>
  
  <p>so i did it by analogy and tried all 3 possible paths</p>
  
  <pre><code>${WEBAPP_STORAGE_HOME}/site/wwwroot/krakend
  ${WEBAPP_STORAGE_HOME}/site/krakend
  ${WEBAPP_STORAGE_HOME}/krakend
  </code></pre>
  
  <p>but no luck  - still getting the error</p>
  
  <blockquote>
    <p>ERROR parsing the configuration file: '/etc/krakend/krakend.json'
    (open): no such file or directory</p>
  </blockquote>