Skip to content

Commit eed35fd

Browse files
Merge pull request #178896 from msangapu-msft/containerQS
first section
2 parents 8f2468d + 0bb265d commit eed35fd

9 files changed

+30
-20
lines changed
25.7 KB
Loading
34.3 KB
Loading
79 KB
Loading
48.1 KB
Loading
52.7 KB
Loading
63.7 KB
Loading
66.5 KB
Loading
44.3 KB
Loading

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

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ zone_pivot_groups: app-service-containers-windows-linux
1414
::: zone pivot="container-windows"
1515
[Azure App Service](overview.md) provides pre-defined application stacks on Windows like ASP.NET or Node.js, running on IIS. However, the preconfigured application stacks [lock down the operating system and prevent low-level access](operating-system-functionality.md). Custom Windows containers do not have these restrictions, and let developers fully customize the containers and give containerized applications full access to Windows functionality.
1616

17-
This quickstart shows how to deploy an ASP.NET app, in a Windows image, to [Docker Hub](https://hub.docker.com/) from Visual Studio. You run the app in a custom container in Azure App Service.
17+
This quickstart shows how to deploy an ASP.NET app, in a Windows image, to [Azure Container Registry](../container-registry/container-registry-intro.md) from Visual Studio. You run the app in a custom container in Azure App Service.
1818

1919
## Prerequisites
2020

2121
To complete this tutorial:
2222

23-
- <a href="https://hub.docker.com/" target="_blank">Sign up for a Docker Hub account</a>
2423
- <a href="https://docs.docker.com/docker-for-windows/install/" target="_blank">Install Docker for Windows</a>.
2524
- <a href="/virtualization/windowscontainers/quick-start/quick-start-windows-10" target="_blank">Switch Docker to run Windows containers</a>.
26-
- <a href="https://www.visualstudio.com/downloads/" target="_blank">Install Visual Studio 2019</a> with the **ASP.NET and web development** and **Azure development** workloads. If you've installed Visual Studio 2019 already:
27-
25+
- <a href="https://www.visualstudio.com/downloads/" target="_blank">Install Visual Studio 2022</a> with the **ASP.NET and web development** and **Azure development** workloads. In *Visual Studio 2022 Community*, ensure **.NET Framework project and item templates** component is selected with **ASP.NET and web development workload**. If you've installed Visual Studio 2022 already:
2826
- Install the latest updates in Visual Studio by selecting **Help** > **Check for Updates**.
2927
- Add the workloads in Visual Studio by selecting **Tools** > **Get Tools and Features**.
3028

@@ -36,49 +34,61 @@ Create an ASP.NET web app by following these steps:
3634

3735
1. In **Create a new project**, find and choose **ASP.NET Web Application (.NET Framework)** for C#, then select **Next**.
3836

39-
1. In **Configure your new project**, name the application _myfirstazurewebapp_, and then select **Create**.
37+
:::image type="content" source="./media/quickstart-custom-container/create-new-project.png?text=VS create a new project" alt-text="Create a new project":::
38+
39+
1. In **Configure your new project**, under **Project name**, name the application _myfirstazurewebapp_. Under **Framework**, select **.NET Framework 4.8** and then select **Create**.
4040

41-
![Configure your web app project](./media/quickstart-custom-container/configure-web-app-project-container.png)
41+
:::image type="content" source="./media/quickstart-custom-container/configure-web-app-project-container.png?text=Configure your web app project" alt-text="Configure your web app project":::
4242

4343
1. You can deploy any type of ASP.NET web app to Azure. For this quickstart, choose the **MVC** template.
4444

45-
1. Select **Docker support**, and make sure authentication is set to **No Authentication**. Select **Create**.
45+
1. Under **Authentication**, select **None**. Under **Advanced**, select **Docker support** and uncheck **Configure for HTTPS**. Select **Create**.
4646

47-
![Create ASP.NET Web Application](./media/quickstart-custom-container/select-mvc-template-for-container.png)
47+
:::image type="content" source="./media/quickstart-custom-container/select-mvc-template-for-container.png?text=Create ASP.NET Web Application" alt-text="Create ASP.NET Web Application":::
4848

4949
1. If the _Dockerfile_ file isn't opened automatically, open it from the **Solution Explorer**.
5050

5151
1. You need a [supported parent image](configure-custom-container.md#supported-parent-images). Change the parent image by replacing the `FROM` line with the following code and save the file:
5252

5353
```dockerfile
54-
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019
54+
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
5555
```
5656

5757
1. From the Visual Studio menu, select **Debug** > **Start Without Debugging** to run the web app locally.
5858

59-
![Run app locally](./media/quickstart-custom-container/local-web-app.png)
59+
:::image type="content" source="./media/quickstart-custom-container/local-web-app.png?text=Run app locally" alt-text="Run app locally":::
6060

61-
## Publish to Docker Hub
61+
## Publish to Azure Container Registry
6262

6363
1. In **Solution Explorer**, right-click the **myfirstazurewebapp** project and select **Publish**.
6464

65-
1. Choose **App Service** and then select **Publish**.
65+
1. In **Target**, select **Docker Container Registry**, and then click **Next**.
66+
67+
:::image type="content" source="./media/quickstart-custom-container/select-docker-container-registry-visual-studio-2022.png?text=Select Docker Container Registry" alt-text="Select Docker Container Registry":::
68+
69+
1. In **Specific Target**, select **Azure Container Registry**, and then click **Next**.
70+
71+
:::image type="content" source="./media/quickstart-custom-container/publish-to-azure-container-registry-visual-studio-2022.png?text=Publish to Azure Container Registry" alt-text="Publish from project overview page":::
72+
73+
1. In **Publish**, make sure the correct subscription is chosen. In **Container registries** select the **+** button to create a new Azure Container Registry.
74+
75+
:::image type="content" source="./media/quickstart-custom-container/create-new-azure-container-registry.png?text=Create new Azure Container Registry" alt-text="Create new Azure Container Registry":::
6676

67-
1. In Pick a **publish target**, select **Container Registry** and **Docker Hub**, and then click **Publish**.
77+
1. In **Create new**, make sure the correct subscription is chosen. Under **Resource group**, select **New** and type *myResourceGroup* for the name, and click **OK**. Under **SKU**, select **Basic**. Under **Registry location**, select a location of the registry then select **Create**.
6878

69-
![Publish from project overview page](./media/quickstart-custom-container/publish-to-docker-vs2019.png)
79+
:::image type="content" source="./media/quickstart-custom-container/new-azure-container-registry-details.png?text=Azure Container Registry details" alt-text="Azure Container Registry details":::
7080

71-
1. Supply your Docker Hub account credentials and select **Save**.
81+
1. In **Publish**, under **Container Registry**, select the registry you created, and then select **Finish**.
7282

73-
Wait for the deployment to complete. The **Publish** page now shows the repository name to use later.
83+
:::image type="content" source="./media/quickstart-custom-container/select-existing-azure-container-registry.png?text=Select existing Azure Container Registry" alt-text="Select existing Azure Container Registry":::
7484

75-
![Screenshot that highlights the repository name.](./media/quickstart-custom-container/published-docker-repository-vs2019.png)
85+
Wait for the deployment to complete. The **Publish** page now shows the repository name. Select the *copy button* to copy the **Repository** name for later.
7686

77-
1. Copy this repository name for later.
87+
:::image type="content" source="./media/quickstart-custom-container/published-docker-repository-visual-studio-2022.png?text=Screenshot that highlights the repository name." alt-text="Screenshot that highlights the repository name.":::
7888

7989
## Create a Windows container app
8090

81-
1. Sign in to the [Azure portal]( https://portal.azure.com).
91+
1. Sign in to the [Azure portal](https://portal.azure.com).
8292

8393
1. Choose **Create a resource** in the upper left-hand corner of the Azure portal.
8494

@@ -90,7 +100,7 @@ Create an ASP.NET web app by following these steps:
90100

91101
![Create a Web App for Containers](media/quickstart-custom-container/create-web-app-container.png)
92102

93-
1. For **Image Source**, choose **Docker Hub** and for **Image and tag**, enter the repository name you copied in [Publish to Docker Hub](#publish-to-docker-hub).
103+
1. For **Image Source**, choose **Docker Hub** and for **Image and tag**, enter the repository name you copied in [Publish to Azure Container Registry](#publish-to-azure-container-registry).
94104

95105
![Configure your a Web App for Containers](media/quickstart-custom-container/configure-web-app-container.png)
96106

0 commit comments

Comments
 (0)