Answers: <p>I don't think you should <strong>mount</strong> the <code>/etc/nginx</code> folder directly. This will <strong>override</strong> your <code>nginx</code> <strong>configuration</strong> and cause the container to fail.</p>
  <p>Instead, you can mount your <strong>configuration file</strong> to <code>/etc/nginx/nginx.conf</code>.</p>
  <p>Check the official <code>nginx</code> <strong>documentation</strong> in <a href="https://hub.docker.com/_/nginx" rel="nofollow noreferrer">Dockerhub</a> for more details on how to properly run the container.</p>
  <h4>EDIT</h4>
  <p><a href="https://azureossd.github.io/2023/07/24/Troubleshooting-volume-mount-issues-on-Azure-Container-Apps/" rel="nofollow noreferrer">Troubleshoot Volume Mounting in Azure App</a> using <code>ContainerAppSystemLogs_CL</code>.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-08-18T07:15:51.700Z
Answers: I tried different paths. Same result.
Answers: tonymontana
Answers: CC BY-SA 4.0
Answers: 2024-08-18T20:14:50.840Z
Answers: @tonymontana whats the value of WEBSITES_ENABLE_APP_SERVICE_STORAGE  ?
Answers: YassineLbk
Answers: CC BY-SA 4.0
Answers: 2024-08-19T07:43:44.110Z
Answers: @ YassineLbk the value of `WEBSITES_ENABLE_APP_SERVICE_STORAGE` is `true`. It didn't work neither for `true` not for `false`
Answers: tonymontana
Answers: CC BY-SA 4.0
Answers: 2024-08-16T19:36:15.943Z
Answers: 2024-08-18T20:05:25.270Z
Answers: 2024-08-18T20:05:25.270Z
Answers: YassineLbk
Body: <p>I can't mount a Path Mapping in an Azure Web App running an <code>nginx</code> docker container. I am getting this error while the docker container starts (taken from <code>Deployment Center-&gt;Logs</code>):</p>
  <pre><code>2024-08-16T11:37:39.7317380Z Volume: BYOS_BLOB_storage_mount cannot be mounted at /etc/nginx during container: my-reverse-proxy_kudu startup. The volume mount is required. Terminate.
  </code></pre>
  <p>I am struggling to wrap my head around this. What am I missing?</p>
  <h3>The Docker container setup:</h3>
  <p><a href="https://i.sstatic.net/JOVPxX2C.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/JOVPxX2C.png" alt="Docker container setup" /></a></p>
  <h3>The Path Mapping:</h3>
  <p><a href="https://i.sstatic.net/pBg22GDf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pBg22GDf.png" alt="Path mapping #1" /></a></p>
  <p><a href="https://i.sstatic.net/A2BsN2a8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/A2BsN2a8.png" alt="Path mapping #2" /></a></p>
  <h3>Full log (<code>Deployment Center-&gt;Logs</code>):</h3>
  <pre><code>2024-08-16T07:19:08.154Z INFO - Status: Downloaded newer image for nginx:latest
  2024-08-16T07:19:08.181Z INFO - Pull Image successful, Time taken: 25 Seconds
  2024-08-16T07:19:08.244Z INFO - Starting container for site
  2024-08-16T07:19:08.244Z INFO - docker run -d --expose=80 --name my-reverse-proxy -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=my-reverse-proxy -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=my-reverse-proxy.azurewebsites.net -e WEBSITE_INSTANCE_ID=&lt;WEBSITE_INSTANCE_ID&gt; nginx:latest
  2024-08-16T07:19:08.244Z INFO - Logging is not enabled for this container.
  Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
  2024-08-16T07:19:09.719Z INFO - Initiating warmup request to container my-reverse-proxy for site my-reverse-proxy
  2024-08-16T07:20:13.944Z INFO - Container my-reverse-proxy for site my-reverse-proxy initialized successfully and is ready to serve requests.
  2024-08-16T11:37:02.591Z INFO - Recycling container because of AzureStorageAccountsChange and isMainSite = True
  2024-08-16T11:37:35.0203256Z Container start method called.
  2024-08-16T11:37:35.0706165Z Establishing network.
  2024-08-16T11:37:35.0772139Z Pulling image: appsvc/kudulite:bullseye_20240522.2.tuxprod.
  2024-08-16T11:37:37.2352623Z Container is starting.
  2024-08-16T11:37:37.2428467Z Establishing user namespace if not established already.
  2024-08-16T11:37:37.2449781Z Establishing network if not established already.
  2024-08-16T11:37:37.2523854Z Mounting volumes.
  2024-08-16T11:37:37.2645251Z Nested mountpoint
  2024-08-16T11:37:37.3220871Z Nested mountpoint volatile/logs
  2024-08-16T11:37:37.3879668Z Nested mountpoint
  2024-08-16T11:37:37.4077750Z Nested mountpoint
  2024-08-16T11:37:37.4784103Z Nested mountpoint
  2024-08-16T11:37:37.5062096Z Nested mountpoint
  2024-08-16T11:37:39.7317380Z Volume: BYOS_BLOB_storage_mount cannot be mounted at /etc/nginx during container: my-reverse-proxy_kudu startup. The volume mount is required. Terminate.
  2024-08-16T11:37:39.7456728Z Container start up failed with reason: VolumeMountFailure. Revert by terminate.
  2024-08-16T11:37:39.8057518Z Container is terminating. Grace period: 0 seconds.
  2024-08-16T11:37:39.8116506Z Container spec TerminationMessagePolicy path
  2024-08-16T11:37:39.8216701Z Container is terminated. Total time elapsed: 13 ms.
  </code></pre>
  
Tags: <azure-devops><azure>
Title: Can't mount a Path Mapping in an Azure Web App running Docker Single Container
UserDisplayName: tonymontana
ThreadText: # Can't mount a Path Mapping in an Azure Web App running Docker Single Container
  
  (Asked by: username_0 on 2024-08-16)
  
  I can't mount a Path Mapping in an Azure Web App running an `nginx` docker container. I am getting this error while the docker container starts (taken from `Deployment Center->Logs`):
  
  ```
  2024-08-16T11:37:39.7317380Z Volume: BYOS_BLOB_storage_mount cannot be mounted at /etc/nginx during container: my-reverse-proxy_kudu startup. The volume mount is required. Terminate.
  
  ```
  
  I am struggling to wrap my head around this. What am I missing?
  
  ### The Docker container setup:
  
  [![Docker container setup](https://i.sstatic.net/JOVPxX2C.png)](https://i.sstatic.net/JOVPxX2C.png)
  
  ### The Path Mapping:
  
  [![Path mapping #1](https://i.sstatic.net/pBg22GDf.png)](https://i.sstatic.net/pBg22GDf.png)
  
  [![Path mapping #2](https://i.sstatic.net/A2BsN2a8.png)](https://i.sstatic.net/A2BsN2a8.png)
  
  ### Full log (`Deployment Center->Logs`):
  
  ```
  2024-08-16T07:19:08.154Z INFO - Status: Downloaded newer image for nginx:latest
  2024-08-16T07:19:08.181Z INFO - Pull Image successful, Time taken: 25 Seconds
  2024-08-16T07:19:08.244Z INFO - Starting container for site
  2024-08-16T07:19:08.244Z INFO - docker run -d --expose=80 --name my-reverse-proxy -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=my-reverse-proxy -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=my-reverse-proxy.azurewebsites.net -e WEBSITE_INSTANCE_ID=<WEBSITE_INSTANCE_ID> nginx:latest
  2024-08-16T07:19:08.244Z INFO - Logging is not enabled for this container.
  Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
  2024-08-16T07:19:09.719Z INFO - Initiating warmup request to container my-reverse-proxy for site my-reverse-proxy
  2024-08-16T07:20:13.944Z INFO - Container my-reverse-proxy for site my-reverse-proxy initialized successfully and is ready to serve requests.
  2024-08-16T11:37:02.591Z INFO - Recycling container because of AzureStorageAccountsChange and isMainSite = True
  2024-08-16T11:37:35.0203256Z Container start method called.
  2024-08-16T11:37:35.0706165Z Establishing network.
  2024-08-16T11:37:35.0772139Z Pulling image: appsvc/kudulite:bullseye_20240522.2.tuxprod.
  2024-08-16T11:37:37.2352623Z Container is starting.
  2024-08-16T11:37:37.2428467Z Establishing user namespace if not established already.
  2024-08-16T11:37:37.2449781Z Establishing network if not established already.
  2024-08-16T11:37:37.2523854Z Mounting volumes.
  2024-08-16T11:37:37.2645251Z Nested mountpoint
  2024-08-16T11:37:37.3220871Z Nested mountpoint volatile/logs
  2024-08-16T11:37:37.3879668Z Nested mountpoint
  2024-08-16T11:37:37.4077750Z Nested mountpoint
  2024-08-16T11:37:37.4784103Z Nested mountpoint
  2024-08-16T11:37:37.5062096Z Nested mountpoint
  2024-08-16T11:37:39.7317380Z Volume: BYOS_BLOB_storage_mount cannot be mounted at /etc/nginx during container: my-reverse-proxy_kudu startup. The volume mount is required. Terminate.
  2024-08-16T11:37:39.7456728Z Container start up failed with reason: VolumeMountFailure. Revert by terminate.
  2024-08-16T11:37:39.8057518Z Container is terminating. Grace period: 0 seconds.
  2024-08-16T11:37:39.8116506Z Container spec TerminationMessagePolicy path
  2024-08-16T11:37:39.8216701Z Container is terminated. Total time elapsed: 13 ms.
  
  ```
  
  **Tags:** azure-devops, azure
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-08-16. Score: 0
  
  I don't think you should **mount** the `/etc/nginx` folder directly. This will **override** your `nginx` **configuration** and cause the container to fail.
  
  Instead, you can mount your **configuration file** to `/etc/nginx/nginx.conf`.
  
  Check the official `nginx` **documentation** in [Dockerhub](https://hub.docker.com/_/nginx) for more details on how to properly run the container.
  
  #### EDIT
  
  [Troubleshoot Volume Mounting in Azure App](https://azureossd.github.io/2023/07/24/Troubleshooting-volume-mount-issues-on-Azure-Container-Apps/) using `ContainerAppSystemLogs_CL`.
  
  > **Comments:**
  > **username_0**: I tried different paths. Same result.  
  > **username_1**: @username_0 whats the value of WEBSITES_ENABLE_APP_SERVICE_STORAGE  ?  
  > **username_0**: @ username_1 the value of `WEBSITES_ENABLE_APP_SERVICE_STORAGE` is `true`. It didn't work neither for `true` not for `false`  
  
  ---
  
  