- Lab
- A Cloud Guru
Create Web App from Docker Container in Azure
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.
Path Info
Table of Contents
-
Challenge
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 (
-
Challenge
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
-
Challenge
Create a New Container Registry
Create a new Azure Container Registry.
-
Challenge
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.
Note: GitHub imposes rate limits for unauthenticated API requests (including cloning via HTTPS). If their limits are hit, GitHub may prompt for authentication when you try to clone the repository. Trying again in a bit will resolve that type of GitHub issue.
-
-
Challenge
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
-
Click Explore pricing plans and select the Standard S1 size.
-
Click Apply.
-
Click Next: Docker.
-
In Image Source, select Azure Container Registry and click Review + create.
-
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.