You have a custom application that your company wants you to deploy. This application is optimized for containers, and you have been given a Dockerfile. The company mandates that all container images be stored in Azure Container Registry. Find the best solution to host your containerized application in Azure App Service.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Start Cloud Shell
- Click the Cloud Shell icon (
>_
) in the upper right.- Select Bash.
- Click Show advanced settings.
- Change Cloud Shell Region to the same location as your lab provided resource group.
- For Storage account, select Use existing.
- For File share, select Create new and give it a name of "fileshare".
- Click Create storage.
- Click the Cloud Shell icon (
- Set Resource Variables in Cloud Shell
- Set the
ACR
(Azure Container Registry) variable. You can use any unique meaningful name for the "<ACR_NAME>": - In the Azure portal, click the listed resource group name.
- Copy it to your clipboard.
- In Cloud Shell, set the
RG
variable, replacing<RESOURCE_GROUP_NAME>
with the name you just copied.
- Set the
- Create a New Container Registry
Create a new Azure Container Registry.
- Build an Image and Push to ACR
Change the directory to
clouddrive
.- Clone the
js-docker
branch of the github repository. - Change the directory to
js-docker
. - Build and push the image to Azure Container Registry using ACR Tasks and the Dockerfile provided.
- Clone the
- Create and Deploy a New Web App
In the Azure portal, open the upper left menu and click App Services.
- In the upper left, click +Create.
- On the Create Web App page, set the following values:
- Resource Group: Existing resource group
- Name: Unique name
- Publish: Docker Container
- In Sku and size, click Change size.
- Click See additional options and select the Standard S1 size.
- Click Apply.
- Click Next: Docker.
- In Image Source, select Azure Container Registry and click Review + create.