In this demonstration, we are going to create a Web App for Containers. This can be created from the Azure portal. Let's go through the following steps:
- Navigate to the Azure portal by opening https://portal.azure.com/.
- Click Create a resource, type Web App for Containers into the search bar, and create a new one.
- Add the following values, as shown in the following screenshot:
- Subscription: Select a subscription.
- Resource Group: PacktContainerResourceGroup.
- Name: PacktContainerApp.
- Publish: Docker Container.
- Operating system: Linux.
- Region: East US.
- App Service Plan/Location: A new App Service plan will automatically be created. If you want to pick an existing one or change the default settings, you can click on it and change the settings:
Web App basic settings
- Next, click the Docker tab and select the following:
- Options: Single Container (you can select Docker Compose (preview) here as well). You can define and run multi Docker containers using Docker Compose. It uses a YAML file to configure the application's services.
- Image Source: Quickstart. Here, you can select Quickstart, Azure Container Registry, Docker Hub, or Private Registry.
- Sample: Static site:
Docker settings
- Click Review and create and then Create.
- After it has been created, go to the overview page of PacktContainerApp. In the top menu, on the right-hand side, copy the URL:
PacktContainerApp
- Open a browser and navigate to the URL. You will see a static page similar to the one shown in the following screenshot:
Sample app
In this demonstration, we deployed a container app. In the next section, we are going to create an App Service background task using WebJobs.