How to Create an Azure Web App for containers
How to Create an Azure Web App for containers

Introduction

In this post, I show how to create an Azure Web App for containers and also explain what are containers. It has never been so easy to deploy container-based web apps in seconds.

Just pull container images from Docker Hub or a private Azure Container Registry. Web App for Containers will deploy the containerized app with your preferred dependencies to production in seconds. The platform automatically takes care of OS patching, capacity provisioning, and load balancing.

Before we start looking at how to create an Azure Web App for containers, let's understand what are containers and why it is so useful.

What are containers?

Let's understand this with an example. When a developer develops a new application and completes it, they would hand this application to the operation team that were then supposed to install it on the production servers and get it running.

If the operation team had got enough documentation from the developer on how and what to install on the production machine, his life is good and application will start as expected.

However, when there were many teams of developers in an enterprise that created quite different types of applications, yet all needed to be installed on the same production servers and run them.

In most cases, each application has its own dependencies such as framework, libraries and so on. Some time, in our .net world, different dot net application developed in different framework e.g. .net framework 2.0, 4.7 or even asp net core.

Here comes the challenge for the operation team, installing required framework and libraries in the production server might conflict application and some application might fail due to installations that was done for other application.

containers
containers

What are the ways to solve this problem?

A first approach was to use virtual machines (VMs). Instead of running multiple applications all on the same server, companies would package and run a single application per VM. With VM the compatibility problems were gone but one VM for one application is heavy as they carry their own OS and other dependencies and also it is costly for companies.

With containers we still need to buy hardware for our applications and instead of virtualization operating system, I can use a container engine to virtualize the operating system. That is a important point to note. With this, we don't need to virtualize hardware to create multiple virtual machines, containers virtualize the operating system. Now I can have different applications running on the container and the application will think it is running on its own operating system which has its dedicated hardware. However, in reality, the host which has one operating system and hardware is been shared across all the containers.

Because with the container, I'm not duplicating operating system, the memory is not duplicated anywhere.

I will be able to place more and more applications on my hardware as I have more room to accommodate.

As a developer, containers are useful to make quick, iterative deployment of the application and these deployments have a high success rate of working in both test and production environment.

Read more on containers in my short post What are containers

Now, before we proceed further, I'm assuming that you already have some knowledge on dockers and created docker image with your application ready to deploy. In my below step by step screen, I will show how to just create web app for containers and cover detailed topic on how to create containers and deploy application in a separate post.

Create an Azure Web App for containers

Go to search bar and type "Web app for containers", you will get an option to select this from Market place. Click on this option to proceed.

Provide all the appropriate details for mandatory fields and click on next which is to configure docker.

Create an Azure Web App for containers

Configure your docker details.

Create an Azure Web App for containers

Also see step by steps on

Azure comes with free service. According to Microsoft, there are many free services for 12 months and always free services. You can refer this information in the FAQ mentioned in the this link.

Great, you are now all set to use Azure Web App for containers.

Conclusion

In this post, I showed how to Create an Azure Web App for containers. This post is part of learning track for azure AZ-203 certification. That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Verified by MonsterInsights