Skip to content

Commit ab1d1cc

Browse files
authored
Merge pull request #47676 from cephalin/windows
win container quickstart
2 parents 41d93df + 33dcad9 commit ab1d1cc

File tree

10 files changed

+107
-0
lines changed

10 files changed

+107
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Run a custom Windows container in Azure (Preview) | Microsoft Docs
3+
description: Learn how to deploy a custom Windows container into Azure App Service.
4+
services: app-service\web
5+
documentationcenter: ''
6+
author: cephalin
7+
manager: jeconnoc
8+
editor: ''
9+
10+
ms.service: app-service-web
11+
ms.workload: web
12+
ms.tgt_pltfrm: na
13+
ms.devlang: na
14+
ms.topic: quickstart
15+
ms.date: 08/07/2018
16+
ms.author: cephalin
17+
ms.custom: mvc
18+
---
19+
# Run a custom Windows container in Azure (Preview)
20+
21+
[Azure App Service](app-service-web-overview.md) provides pre-defined application stacks on Windows like ASP.NET or Node.js, running on IIS. The preconfigured Windows environment locks down the operating system from administrative access, software installations, changes to the global assembly cache, and so on (see [Operating system functionality on Azure App Service](web-sites-available-operating-system-functionality.md)). If your application requires more access than the preconfigured environment allows, you can deploy a custom Windows container instead. This quickstart shows how to deploy a custom IIS image to Azure App Service from [Docker Hub](https://hub.docker.com/).
22+
23+
![](media/app-service-web-get-started-windows-container/app-running.png)
24+
25+
## Sign in to Azure
26+
27+
Sign in to the Azure portal at https://portal.azure.com.
28+
29+
## Create a Windows container app
30+
31+
1. Choose **Create a resource** in the upper left-hand corner of the Azure portal.
32+
33+
2. In the search box above the list of Azure Marketplace resources, search for and select **Web App for Containers**.
34+
35+
3. Provide an app name, such as *mywebapp*, accept the defaults to create a new resource group, and click **Windows (Preview)** in the **OS** box.
36+
37+
![](media/app-service-web-get-started-windows-container/portal-create-page.png)
38+
39+
4. Create an App Service plan by clicking **App Service plan/Location** > **Create new**. Give the new plan a name, accept the defaults, and click **OK**.
40+
41+
![](media/app-service-web-get-started-windows-container/portal-create-plan.png)
42+
43+
5. Click **Configure container**, type _microsoft/iis:latest_ in **Image and optional tag**, and click **OK**.
44+
45+
![](media/app-service-web-get-started-windows-container/portal-configure-container.png)
46+
47+
In this article, you use the public [microsoft/iis:latest](https://hub.docker.com/r/microsoft/iis/) Docker Hub image. If you have a custom image elsewhere for your web application, such as in [Azure Container Registry](/azure/container-registry/) or in any other private repository, you can configure it here.
48+
49+
6. Click **Create** and wait for Azure to create the required resources.
50+
51+
## Browse to the container app
52+
53+
When the Azure operation is complete, a notification box is displayed.
54+
55+
![](media/app-service-web-get-started-windows-container/portal-create-finished.png)
56+
57+
1. Click **Go to resource**.
58+
59+
2. In the app page, click the link under **URL**.
60+
61+
A new browser page is opened to the following page:
62+
63+
![](media/app-service-web-get-started-windows-container/app-starting.png)
64+
65+
Wait a few minutes and try again, until you get the IIS welcome page:
66+
67+
![](media/app-service-web-get-started-windows-container/app-running.png)
68+
69+
**Congratulations!** You're running your first custom Windows container in Azure App Service.
70+
71+
## See container start-up logs
72+
73+
It may take some time for the Windows container to load. To see the progress, navigate to the following URL by replacing *\<app_name>* with the name of your app.
74+
```
75+
https://<app_name>.scm.azurewebsites.net/api/logstream
76+
```
77+
78+
The streamed logs looks like this:
79+
80+
```
81+
2018-07-27T12:03:11 Welcome, you are now connected to log-streaming service.
82+
27/07/2018 12:04:10.978 INFO - Site: win-container-demo - Start container succeeded. Container: facbf6cb214de86e58557a6d073396f640bbe2fdec88f8368695c8d1331fc94b
83+
27/07/2018 12:04:16.767 INFO - Site: win-container-demo - Container start complete
84+
27/07/2018 12:05:05.017 INFO - Site: win-container-demo - Container start complete
85+
27/07/2018 12:05:05.020 INFO - Site: win-container-demo - Container started successfully
86+
```
87+
88+
## Use a different Docker image
89+
90+
You are free to use a different custom Docker image to run your app. However, you must choose the right [parent image](https://docs.docker.com/develop/develop-images/baseimages/) for the framework you want:
91+
92+
- To deploy .NET Framework apps, use a parent image based on the Windows Server Core 2016 [Long-Term Servicing Channel (LTSC)](https://docs.microsoft.com/windows-server/get-started/semi-annual-channel-overview#long-term-servicing-channel-ltsc) release.
93+
- To deploy .NET Core apps, use a parent image based on the Windows Server Nano 2016 [Long-Term Servicing Channel (LTSC)](https://docs.microsoft.com/windows-server/get-started/semi-annual-channel-overview#long-term-servicing-channel-ltsc) release.
94+
95+
It takes some time to download a parent image during app start-up. However, you can reduce start-up time by using one of the following parent images that are already cached in Azure App Service:
96+
97+
- [microsoft/iis](https://hub.docker.com/r/microsoft/iis/):windowsservercore-ltsc2016, latest
98+
- [microsoft/iis](https://hub.docker.com/r/microsoft/iis/):nanoserver-sac2016
99+
- [microsoft/aspnet](https://hub.docker.com/r/microsoft/aspnet/):4.7.2-windowsservercore-ltsc2016, 4.7.2, latest
100+
- [microsoft/dotnet](https://hub.docker.com/r/microsoft/dotnet/):2.1-aspnetcore-runtime
101+
- [microsoft/dotnet](https://hub.docker.com/r/microsoft/dotnet/):2.1-sdk

articles/app-service/index.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ sections:
5757
src: https://docs.microsoft.com/azure/app-service/media/index/logo_html5.svg
5858
text: HTML
5959
href: https://docs.microsoft.com/azure/app-service/app-service-web-get-started-html
60+
- image:
61+
src: https://docs.microsoft.com/media/logos/logo_docker.svg
62+
text: Custom Windows container (Preview)
63+
href: https://docs.microsoft.com/azure/app-service/app-service-web-get-started-windows-container
6064
- type: paragraph
6165
text: 'Learn how to deploy your code:'
6266
- type: list
108 KB
Loading
93 KB
Loading
9.39 KB
Loading
51.1 KB
Loading
8.59 KB
Loading
17.6 KB
Loading
67.4 KB
Loading

articles/app-service/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
href: app-service-web-get-started-java.md
2626
- name: Create static HTML site
2727
href: app-service-web-get-started-html.md
28+
- name: Run custom Windows container
29+
href: app-service-web-get-started-windows-container.md
2830
- name: Tutorials
2931
items:
3032
- name: App with DB

0 commit comments

Comments
 (0)