You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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.
16
16
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.
18
18
19
19
## Prerequisites
20
20
21
21
To complete this tutorial:
22
22
23
-
- <ahref="https://hub.docker.com/"target="_blank">Sign up for a Docker Hub account</a>
24
23
- <ahref="https://docs.docker.com/docker-for-windows/install/"target="_blank">Install Docker for Windows</a>.
25
24
- <ahref="/virtualization/windowscontainers/quick-start/quick-start-windows-10"target="_blank">Switch Docker to run Windows containers</a>.
26
-
- <ahref="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
+
- <ahref="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:
28
26
- Install the latest updates in Visual Studio by selecting **Help** > **Check for Updates**.
29
27
- Add the workloads in Visual Studio by selecting **Tools** > **Get Tools and Features**.
30
28
@@ -36,49 +34,61 @@ Create an ASP.NET web app by following these steps:
36
34
37
35
1. In **Create a new project**, find and choose **ASP.NET Web Application (.NET Framework)** for C#, then select **Next**.
38
36
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**.
40
40
41
-

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":::
42
42
43
43
1. You can deploy any type of ASP.NET web app to Azure. For this quickstart, choose the **MVC** template.
44
44
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**.
46
46
47
-

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":::
48
48
49
49
1. If the _Dockerfile_ file isn't opened automatically, open it from the **Solution Explorer**.
50
50
51
51
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:
52
52
53
53
```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
55
55
```
56
56
57
57
1. From the Visual Studio menu, select **Debug** > **Start Without Debugging** to run the web app locally.
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":::
66
76
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**.
68
78
69
-


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.
76
86
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.":::
78
88
79
89
## Create a Windows container app
80
90
81
-
1. Sign in to the [Azure portal](https://portal.azure.com).
91
+
1. Sign in to the [Azure portal](https://portal.azure.com).
82
92
83
93
1. Choose **Create a resource** in the upper left-hand corner of the Azure portal.
84
94
@@ -90,7 +100,7 @@ Create an ASP.NET web app by following these steps:
90
100
91
101

92
102
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).
94
104
95
105

0 commit comments