Attaching Azure File Share to NGINX Container app using only the portal and NOT az cli

Brian Lemaster 0 Reputation points
2024-10-17T23:01:42.65+00:00

I have a Container App Environment, with Azure File Shares already configured. I create a Container App in the environment using image nginx:latest. I want to mount the /etc/nginx path to the storage volume. I have done this so many times, and repeatedly get a failed revision. I have successfully added a mount/volume if I export the YAML, modify and update the Container App. I need to know the process to do this entirely via the Portal.

  1. Create Container App Enviroment - Check
  2. Create Storage Accounts, shared access keys, file shares, etc. Check
  3. Create App in Container environment. Image is nginx:latest.
  4. Revision spins up, and is available.
  5. I now want to mount the Azure File Share for proxy-shared-data as the /etc/nginx folder.
  6. This is where I am stuck. The new revision fails when I do this. Container App shows Volume, Environment shows volume, Not sure what I am doing wrong. I have repeated this process over and over and same results - so must be missing a step.
Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
{count} votes

1 answer

Sort by: Most helpful
  1. Keshavulu Dasari 4,925 Reputation points Microsoft External Staff Moderator
    2024-10-18T19:57:02.3666667+00:00

    Hi Brian Lemaster,
    There are a couple of issues with your script.

    1. ‘volume’ is misspelled or not recognized by the system:
      • The command az containerapp volume create is incorrect. The correct command should be az containerapp update with the appropriate volume mount configuration.
      1. Unrecognized arguments: --volume-mounts:
        • The --volume-mounts argument is not valid for the az containerapp update command. Instead, you need to use the --yaml option to specify the volume mounts in a YAML configuration file.
    2. Create the Container App: This part of your script remains the same.
    3. Create a YAML Configuration File: This file specifies the volume mount configuration.
    4. Update the Container App: Use the az containerapp update command with the --yaml option to apply the volume mount configuration.

    By using the YAML configuration file, you can correctly specify the volume mount details and avoid the errors,

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.