Skip to content

Commit 6883842

Browse files
Merge pull request #314495 from cdpark/refresh-appservice-batch2
Q&M: Freshness - Azure App Service - MSangapu - batch 2
2 parents f1caac2 + cf0b357 commit 6883842

1 file changed

Lines changed: 55 additions & 39 deletions

File tree

articles/app-service/configure-custom-container.md

Lines changed: 55 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to configure a custom container in Azure App Service. Thi
44
author: msangapu-msft
55
ms.author: msangapu
66
ms.topic: how-to
7-
ms.date: 03/06/2025
7+
ms.date: 04/08/2026
88
ms.custom: devx-track-azurepowershell, devx-track-azurecli, linux-related-content
99
zone_pivot_groups: app-service-containers-windows-linux
1010
ms.service: azure-app-service
@@ -16,13 +16,21 @@ This article shows you how to configure a custom container to run on Azure App S
1616

1717
::: zone pivot="container-windows"
1818

19-
Learn about key concepts and get instructions for containerization of Windows apps in App Service. New users should first follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md).
19+
Learn about key concepts and get instructions for containerization of Windows apps in App Service.
20+
21+
## Prerequisites
22+
23+
New users should first follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md).
2024

2125
::: zone-end
2226

2327
::: zone pivot="container-linux"
2428

25-
Learn about key concepts and get instructions for containerization of Linux apps in App Service. New users should first follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md). For sidecar containers, see [Tutorial: Configure a sidecar container for custom container in Azure App Service](tutorial-custom-container-sidecar.md).
29+
Learn about key concepts and get instructions for containerization of Linux apps in App Service.
30+
31+
## Prerequisites
32+
33+
New users should first follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md). For sidecar containers, see [Tutorial: Configure a sidecar container for a custom container app](tutorial-custom-container-sidecar.md).
2634

2735
::: zone-end
2836

@@ -35,19 +43,19 @@ Learn about key concepts and get instructions for containerization of Linux apps
3543

3644
Select the right [parent image (base image)](https://docs.docker.com/develop/develop-images/baseimages/) for the framework you want for your custom Windows image:
3745

38-
- To deploy .NET Framework apps, use a parent image based on the Windows Server 2019 Core [Long-Term Servicing Channel](/windows-server/get-started/servicing-channels-comparison#long-term-servicing-channel-ltsc) release.
39-
- To deploy .NET Core apps, use a parent image based on the Windows Server 2019 Nano [Annual Channel](/windows-server/get-started/servicing-channels-comparison#annual-channel-ac) release.
46+
- To deploy .NET Framework apps, use a parent image based on the Windows Server [Long-Term Servicing Channel](/windows-server/get-started/servicing-channels-comparison#long-term-servicing-channel-ltsc) release.
47+
- To deploy .NET Core apps, use a parent image based on the Windows Server [Annual Channel](/windows-server/get-started/servicing-channels-comparison#annual-channel-ac) release.
4048

4149
It takes some time to download a parent image during app startup. You can reduce startup time by using one of the following parent images that are already cached in Azure App Service:
4250

43-
- [mcr.microsoft.com/windows/servercore:ltsc2022](https://mcr.microsoft.com/product/windows/servercore/about)
44-
- [mcr.microsoft.com/windows/servercore:ltsc2019](https://mcr.microsoft.com/product/windows/servercore/about)
45-
- [mcr.microsoft.com/dotnet/framework/aspnet](https://mcr.microsoft.com/product/dotnet/framework/aspnet/tags): `4.8-windowsservercore-ltsc2022`
46-
- [mcr.microsoft.com/dotnet/framework/aspnet](https://mcr.microsoft.com/product/dotnet/framework/aspnet/tags): `4.8-windowsservercore-ltsc2019`
47-
- [mcr.microsoft.com/dotnet/runtime](https://mcr.microsoft.com/product/dotnet/runtime/tags): `6.0-nanoserver-ltsc2022`
48-
- [mcr.microsoft.com/dotnet/runtime](https://mcr.microsoft.com/product/dotnet/runtime/tags): `6.0-nanoserver-1809`
49-
- [mcr.microsoft.com/dotnet/aspnet](https://mcr.microsoft.com/product/dotnet/aspnet/tags): `6.0-nanoserver-ltsc2022`
50-
- [mcr.microsoft.com/dotnet/aspnet](https://mcr.microsoft.com/product/dotnet/aspnet/tags): `6.0-nanoserver-1809`
51+
- [mcr.microsoft.com/windows/servercore:ltsc2025](https://mcr.microsoft.com/artifact/mar/windows/servercore/about)
52+
- [mcr.microsoft.com/windows/servercore:ltsc2022](https://mcr.microsoft.com/artifact/mar/windows/servercore/about)
53+
- [mcr.microsoft.com/dotnet/framework/aspnet:4.8.1-windowsservercore-ltsc2022](https://mcr.microsoft.com/artifact/mar/dotnet/framework/aspnet/tag/4.8.1-windowsservercore-ltsc2022)
54+
- [mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019](https://mcr.microsoft.com/artifact/mar/dotnet/framework/aspnet/tag/4.8-windowsservercore-ltsc2019)
55+
- [mcr.microsoft.com/dotnet/runtime:10.0-nanoserver-ltsc2025](https://mcr.microsoft.com/artifact/mar/dotnet/runtime/tag/10.0-nanoserver-ltsc2025)
56+
- [mcr.microsoft.com/dotnet/runtime:8.0-nanoserver-ltsc2022](https://mcr.microsoft.com/artifact/mar/dotnet/runtime/tag/8.0-nanoserver-ltsc2022)
57+
- [mcr.microsoft.com/dotnet/aspnet:10.0-nanoserver-ltsc2025](https://mcr.microsoft.com/artifact/mar/dotnet/aspnet/tag/10.0-nanoserver-ltsc2025)
58+
- [mcr.microsoft.com/dotnet/aspnet:8.0-nanoserver-ltsc2022](https://mcr.microsoft.com/artifact/mar/dotnet/aspnet/tag/8.0-nanoserver-ltsc2022)
5159

5260
::: zone-end
5361

@@ -56,30 +64,32 @@ It takes some time to download a parent image during app startup. You can reduce
5664
Use the following command to change the current Docker image to a new image in an existing custom container:
5765

5866
```azurecli-interactive
59-
az webapp config container set --name <app-name> --resource-group <group-name> --docker-custom-image-name <docker-hub-repo>/<image>
67+
az webapp config container set --name <app-name> --resource-group <group-name> --container-image-name <docker-hub-repo>/<image>
6068
```
6169

70+
Replace the *\<placeholders>* with your own values.
71+
6272
## Use an image from a private registry
6373

6474
To use an image from a private registry, such as Azure Container Registry, run the following command:
6575

6676
```azurecli-interactive
67-
az webapp config container set --name <app-name> --resource-group <group-name> --docker-custom-image-name <image-name> --docker-registry-server-url <private-repo-url> --docker-registry-server-user <username> --docker-registry-server-password <password>
77+
az webapp config container set --name <app-name> --resource-group <group-name> --container-image-name <image-name> --docker-registry-server-url <private-repo-url> --docker-registry-server-user <username> --docker-registry-server-password <password>
6878
```
6979

70-
Supply the sign-in credentials for your private registry account in the `\<username>` and `\<password>` fields.
80+
Supply the sign-in credentials for your private registry account in the *\<username>* and *\<password>* fields.
7181

7282
## Use managed identity to pull an image from Azure Container Registry
7383

7484
Use the following steps to configure your web app to pull from Azure Container Registry by using managed identity. The steps use system-assigned managed identity, but you can also use user-assigned managed identity.
7585

76-
1. Enable [the system-assigned managed identity](./overview-managed-identity.md) for the web app by using the [`az webapp identity assign`](/cli/azure/webapp/identity#az-webapp-identity-assign) command:
86+
1. Enable the [system-assigned managed identity](./overview-managed-identity.md) for the web app by using the [`az webapp identity assign`](/cli/azure/webapp/identity#az-webapp-identity-assign) command:
7787

7888
```azurecli-interactive
7989
az webapp identity assign --resource-group <group-name> --name <app-name> --query principalId --output tsv
8090
```
8191

82-
Replace *\<app-name>* with the name you used in the previous step. The output of the command, filtered by the `--query` and `--output` arguments, is the service principal ID of the assigned identity.
92+
Replace *\<app-name>* with the name of your app. The output of the command, filtered by the `--query` and `--output` arguments, is the service principal ID of the assigned identity.
8393

8494
1. Get the resource ID of your container registry:
8595

@@ -97,8 +107,8 @@ Use the following steps to configure your web app to pull from Azure Container R
97107

98108
Replace the following values:
99109

100-
- *\<principal-id>* with the service principal ID from the `az webapp identity assign` command
101-
- *\<registry-resource-id>* with the ID of your container registry from the `az acr show` command
110+
- *\<principal-id>* with the service principal ID from the `az webapp identity assign` command.
111+
- *\<registry-resource-id>* with the ID of your container registry from the `az acr show` command.
102112

103113
For more information about these permissions, see [What is Azure role-based access control?](../role-based-access-control/overview.md)
104114

@@ -108,9 +118,7 @@ Use the following steps to configure your web app to pull from Azure Container R
108118
az webapp config set --resource-group <group-name> --name <app-name> --generic-configurations '{"acrUseManagedIdentityCreds": true}'
109119
```
110120

111-
Replace the following values:
112-
113-
- *\<app-name>* with the name of your web app.
121+
Replace *\<app-name>* with the name of your web app.
114122

115123
> [!TIP]
116124
> If you use PowerShell console to run the commands, escape the strings in the `--generic-configurations` argument in this step and the next step. For example: `--generic-configurations '{\"acrUseManagedIdentityCreds\": true'`.
@@ -121,7 +129,7 @@ Use the following steps to configure your web app to pull from Azure Container R
121129
az identity show --resource-group <group-name> --name <identity-name> --query clientId --output tsv
122130
```
123131

124-
Replace the `<identity-name>` of your user-assigned managed identity and use the output `<client-id>` to configure the user-assigned managed identity ID.
132+
Replace the *\<identity-name>* of your user-assigned managed identity and use the output *\<client-id>* to configure the user-assigned managed identity ID.
125133

126134
```azurecli-interactive
127135
az webapp config set --resource-group <group-name> --name <app-name> --generic-configurations '{"acrUserManagedIdentityID": "<client-id>"}'
@@ -203,7 +211,7 @@ For Internet Information Services (IIS) or .NET Framework (4.0 or later) contain
203211

204212
::: zone pivot="container-linux"
205213

206-
You can use this method for both single-container or multi-container apps, where the environment variables are specified in the `docker-compose.yml` file.
214+
You can use this method for both single-container or multi-container apps, where the environment variables are specified in the *docker-compose.yml* file.
207215

208216
::: zone-end
209217

@@ -213,7 +221,10 @@ You can use this method for both single-container or multi-container apps, where
213221

214222
You can use the `C:\home` directory in your custom container file system to persist files across restarts and share them across instances. When you use the `C:\home` directory, your custom container can access persistent storage.
215223

216-
When persistent storage is disabled, writes to the `C:\home` directory aren't persisted across app restarts or across multiple instances. When persistent storage is enabled, all writes to the `C:\home` directory persist. All instances of a scaled-out app can access them. When the container starts, if any files are present on the persistent storage, they overwrite any contents in the `C:\home` directory of the container.
224+
- When persistent storage is *disabled*, writes to the `C:\home` directory aren't persisted across app restarts or across multiple instances.
225+
- When persistent storage is *enabled*, all writes to the `C:\home` directory persist.
226+
227+
All instances of a scaled-out app can access them. When the container starts, if any files are present on the persistent storage, they overwrite any contents in the `C:\home` directory of the container.
217228

218229
The only exception is the `C:\home\LogFiles` directory. This directory stores the container and application logs. The folder always persists upon app restarts if [application logging is enabled](troubleshoot-diagnostic-logs.md?#enable-application-logging-windows) with the **File System** option, whether or not persistent storage is enabled. In other words, when you enable or disable persistent storage, it doesn't affect application logging behavior.
219230

@@ -233,11 +244,14 @@ Set-AzWebApp -ResourceGroupName <group-name> -Name <app-name> -AppSettings @{"WE
233244

234245
::: zone pivot="container-linux"
235246

236-
You can use the `/home` directory in your custom container file system to persist files across restarts and share them across instances. When you use the `C:\home` directory, your custom container can access persistent storage. Keep in mind that data that you save within `/home` contributes to the [storage space quota](../azure-resource-manager/management/azure-subscription-service-limits.md#azure-app-service-limits) included with your App Service plan.
247+
You can use the `/home` directory in your custom container file system to persist files across restarts and share them across instances. When you use the `/home` directory, your custom container can access persistent storage. Keep in mind that data that you save within `/home` contributes to the [storage space quota](../azure-resource-manager/management/azure-subscription-service-limits.md#azure-app-service-limits) included with your App Service plan.
237248

238-
When persistent storage is disabled, writes to the `C:\home` directory aren't persisted across app restarts or across multiple instances. When persistent storage is enabled, all writes to the `C:\home` directory persist. All instances of a scaled-out app can access them. When the container starts, if any files are present on the persistent storage, they overwrite any contents in the `C:\home` directory of the container.
249+
- When persistent storage is *disabled*, writes to the `/home` directory aren't persisted across app restarts or across multiple instances.
250+
- When persistent storage is *enabled*, all writes to the `/home` directory persist.
239251

240-
The only exception is the `C:\home\LogFiles` directory. This directory stores the container and application logs. The folder always persists upon app restarts if [application logging is enabled](troubleshoot-diagnostic-logs.md?#enable-application-logging-windows) with the **File System** option, whether or not persistent storage is enabled. In other words, when you enable or disable persistent storage, it doesn't affect application logging behavior.
252+
All instances of a scaled-out app can access them. When the container starts, if any files are present on the persistent storage, they overwrite any contents in the `/home` directory of the container.
253+
254+
The only exception is the `/home/LogFiles` directory. This directory stores the container and application logs. The folder always persists upon app restarts if [application logging is enabled](troubleshoot-diagnostic-logs.md?#enable-application-logging-linuxcontainer) with the **File System** option, whether or not persistent storage is enabled. In other words, when you enable or disable persistent storage, it doesn't affect application logging behavior.
241255

242256
We recommend that you write data to `/home` or a [mounted Azure storage path](configure-connect-to-azure-storage.md?tabs=portal&pivots=container-linux). Data that you write outside these paths isn't persistent during restarts. The data is saved to platform-managed host disk space separate from the App Service plans file storage quota.
243257

@@ -340,7 +354,9 @@ The value is defined in megabytes (MB) and must be less and equal to the total p
340354

341355
## Customize the number of compute cores
342356

343-
By default, a Windows container runs with all available cores for your pricing tier. You might want to reduce the number of cores that your staging slot uses. To reduce the number of cores that a container uses, set the `WEBSITE_CPU_CORES_LIMIT` app setting to the preferred number of cores. You can set it by using [Cloud Shell](https://shell.azure.com). In Bash, use the following command:
357+
By default, a Windows container runs with all available cores for your pricing tier. You might want to reduce the number of cores that your staging slot uses. To reduce the number of cores that a container uses, set the `WEBSITE_CPU_CORES_LIMIT` app setting to the preferred number of cores. You can set it by using [Cloud Shell](https://shell.azure.com).
358+
359+
In Bash, use the following command:
344360

345361
```azurecli-interactive
346362
az webapp config appsettings set --resource-group <group-name> --name <app-name> --slot staging --settings WEBSITE_CPU_CORES_LIMIT=1
@@ -489,7 +505,7 @@ You can use Secure Shell (SSH) to remotely run administrative commands from a co
489505
490506
1. Rebuild and push the Docker image to the registry, and then test the **Web App SSH** feature in the Azure portal.
491507

492-
For more troubleshooting information, see the Azure App Service blog: [Enable SSH on a Linux web app for containers](https://azureossd.github.io/2022/04/27/2022-Enabling-SSH-on-Linux-Web-App-for-Containers/index.html#troubleshooting).
508+
For more troubleshooting information, see the Azure App Service [Troubleshooting blog](https://azureossd.github.io/2022/04/27/2022-Enabling-SSH-on-Linux-Web-App-for-Containers/index.html#troubleshooting).
493509

494510
## Access diagnostic logs
495511

@@ -498,7 +514,7 @@ For more troubleshooting information, see the Azure App Service blog: [Enable SS
498514
## Configure multi-container apps
499515

500516
> [!NOTE]
501-
> The Docker Compose feature will be retired on March 31, 2027. Sidecar containers succeed multi-container apps in App Service. For new services, see [Tutorial: Configure a sidecar container for custom container in Azure App Service](tutorial-custom-container-sidecar.md). For existing multi-container apps in App Service, see [Migrate your Docker Compose applications to the sidecar feature](https://azure.github.io/AppService/2025/04/01/Docker-compose-migration.html).
517+
> The Docker Compose feature will be retired on March 31, 2027. Sidecar containers succeed multi-container apps in App Service. For new services, see [Tutorial: Configure a sidecar container for a custom container app](tutorial-custom-container-sidecar.md). For existing multi-container apps in App Service, see [Migrate your Docker Compose applications to the sidecar feature](https://azure.github.io/AppService/2025/04/01/Docker-compose-migration.html).
502518
503519
- [Use persistent storage in Docker Compose](#use-persistent-storage-in-docker-compose)
504520
- [Preview limitations](#preview-limitations)
@@ -531,10 +547,10 @@ wordpress:
531547
532548
Multi-container is currently in preview. The following App Service platform features aren't supported:
533549
534-
- Authentication or authorization.
535-
- Managed identities.
536-
- Cross-origin resource sharing (CORS).
537-
- Virtual network integration with Docker Compose scenarios.
550+
- Authentication or authorization
551+
- Managed identities
552+
- Cross-origin resource sharing (CORS)
553+
- Virtual network integration with Docker Compose scenarios
538554
539555
Docker Compose on Azure App Service currently has a limit of 4,000 characters.
540556
@@ -579,6 +595,6 @@ The following sections show supported and unsupported Docker Compose configurati
579595
## Related content
580596

581597
- [Tutorial: Migrate custom software to Azure App Service by using a custom container](tutorial-custom-container.md)
582-
- [Tutorial: Configure a sidecar container for custom container in Azure App Service](tutorial-custom-container-sidecar.md)
583-
- [Environment variables and app settings reference](reference-app-settings.md)
584-
- [Load certificates in Windows/Linux containers](configure-ssl-certificate-in-code.md#load-certificates-in-linuxwindows-containers)
598+
- [Tutorial: Configure a sidecar container for a custom container app](tutorial-custom-container-sidecar.md)
599+
- [Environment variables and app settings in Azure App Service](reference-app-settings.md)
600+
- [Load certificates in Linux/Windows containers](configure-ssl-certificate-in-code.md#load-certificates-in-linuxwindows-containers)

0 commit comments

Comments
 (0)