Skip to content

Run as a Web App for Containers

Bryan Soltis edited this page Jul 14, 2023 · 9 revisions

Run as a Web App for Containers (App Service running a container)


## Overview The Azure Naming Tool requires persistent storage for the configuration files when run as a container. The following processes will explain how to create this volume for your Azure App Service Container. All configuration JSON files will be stored in the volume to ensure the configuration is persisted.


NOTE:
For many of the steps, a sample process is provided. However, there are many ways to accomplish each step.

Steps

  1. Scroll up to the top-left corner of this page.
  2. Click on the AzureNamingTool link to open the root of this repository.
  3. Click the green <>Code button and select Download ZIP.
  4. Open your Downloads folder using File Explorer.
  5. Extract the contents of the ZIP archive.


NOTE:
Validate the project files extracted successfully and match the contents in the GitHub repository.

  1. Open a Command Prompt.
  2. Change the directory to the AzNamingTool folder. For example:
cd .\Downloads\AzureNamingTool
  1. Run the following Docker command to build the image:
docker build -t azurenamingtool .


NOTE:
Ensure the '.' is included in the command

  1. Create an Azure Container Registry: Microsoft Docs reference
  2. Build and publish your image to the Azure Container Registry: Microsoft Docs reference
  3. Create an Azure Files file share for persistent storage: Microsoft Docs reference

FileShare

  1. Create an Azure App Service - Web App: Microsoft Docs reference
  2. Mount the file share as local storage for the Azure App Service: Microsoft Docs reference

MountStorage

  1. Deploy the image from the Azure Container Registry to the Azure App Service: Microsoft Docs reference
  2. Access the site using your Azure App Service URL.

NOTE: It is recommended that you enable authentication on your Container App to prevent unauthorized access. Authentication and authorization in Azure Container Apps

Clone this wiki locally