0

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

The Path Mapping:

Path mapping #1

Path mapping #2

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.

1 Answer 1

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 for more details on how to properly run the container.

EDIT

Troubleshoot Volume Mounting in Azure App using ContainerAppSystemLogs_CL.

3
  • I tried different paths. Same result. Commented Aug 18 at 7:15
  • @tonymontana whats the value of WEBSITES_ENABLE_APP_SERVICE_STORAGE ?
    – YassineLbk
    Commented Aug 18 at 20:14
  • @ YassineLbk the value of WEBSITES_ENABLE_APP_SERVICE_STORAGE is true. It didn't work neither for true not for false Commented Aug 19 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.