Azure web app for containers

Azure web app for containers

In this azure tutorial, we will discuss the Azure web app for containers. Also, we will discuss on the below topics

  • Create an Azure web app for containers
  • What is azure Docker?
  • What are Windows containers?
  • Is Docker a VM?
  • What are Kubernetes containers?
  • How do you stop a container?
  • Azure web app for containers vs AKS
  • Azure web app for containers vs container instances
  • Azure Web App for Containers Pricing

Azure web app for containers

Azure Web App for Containers is a component of the Azure App Service platform and is an excellent option for developers who need more control over the runtime, framework, tooling of a web application.

Azure Web App For Containers Tutorial

This is an excellent Azure service that helps developers to package their application and all related dependencies in a container and then host the container on the Web Application.

  • Web App for Containers is purely a Platform as a Service (Paas)
  • It runs on a single container and can also run on multiple containers using a docker-compose.
  • Web app for container supports both windows or Linux docker containers.
  • Web App for Container supports different DevOps tools such as Azure DevOps, Jenkins, Maven, etc
  • In the case of non-Microsoft applications, we need to install all the dependencies before hosting the main application.

Create an Azure web app for containers

Now let’s discuss on how to create an Azure web app for containers in Azure portal.

  • Log in to the Azure portal (https://portal.azure.com/)
  • Click on the + Create a resource button from the left navigation.
Create an Azure web app for containers

Or for the same option, you can click on the + Create a resource button from the Azure services section.

How to create an Azure web app for containers
  • Now from the New page, search for web app for containers.
Azure web app for containers
  • For the same option, you can also search for the web app for containers directly after log in to Azure portal.
How to configure web app for containers
  • Click on the Create button
Azure web app for containers tutorials
  • For the same option, you can also search for the web app for containers directly after login to the Azure portal. Then click on the search result Web App for Containers under Marketplace.
How to configure web app for containers

In the Web App window, From the Basics tab, Fill the below details

  • Subscription: Choose your subscription details.
  • Resource Group: You can create a new resource group by clicking the Create new link or you can select the existing Resource Group.
  • Name: Provide a name
  • Publish: Choose the Docker container for the Publish option.
  • Operating System: you can choose the operating system as Linux or windows.
  • Region: You can choose your region.
  • Linux Plan(Central US): You can create a new one or u can use the default one selected based on your region.
  • SKU and Size: Based on the Linux plan selected this option will auto-populate.
Azure app service windows container
deploy to an azure web app for containers
  • Click on the Next:Docker > button to go to the Docker tab.
  • In the Docker tab keep the default option as it is. You can also change as per your business needs.
How to create Azure app service windows container
  • Now click on the Next: Monitoring > button to go to the Monitoring tab.
  • Keep the default option as it is in the Monitoring tab.
Azure container instances
  • Click on the Next : Tags > button to go to the Tags tab.
  • Don’t change anything on the Tags tab. Keep the default option as it is
How to create azure container instances
  • Now click on the Next : Review + create > button
why to create an Azure web app for containers
  • Click on the Create button. You can see below the deployment is completed. Click on the Go to resource button.
What is web app for containers

See below it is created successfully.

What is the benifit of web app for containers

What is azure Docker?

Now, let us understand what is Azure Docker?

  • Docker is a container management and imaging platform.
  • This supports operating systems like Windows and Linux.
  • Azure Docker is a container-based technology.
  • Docker is an open-source technology and runs on a single node.
  • Docker allows you to run containers. A container is nothing but a sandboxed process running an application and all its dependencies to host on an operating system.

What are Windows containers?

  • Windows containers are nothing but portable operating environments supported by the Microsoft Windows Server 2016 operating system.
  • You can manage windows containers by using different tools like Docker and PowerShell.
  • A container is a logical environment which is created on a computer where any of the application can run.

There are two types of windows container based on the Microsoft Windows server operating system

  1. Windows Server containers: Windows server containers always rely on the windows server kernel.
  2. Hyper-V containers: Hyper-V Containers are isolated virtual machines that incorporate their own copy of the Windows kernel.

Is Docker a VM?

  • Docker is a container-based technology and containers are logical environment which is created on a computer where any of the application can run.
  • On the other hand, Virtual machines are not based on container-based technology. Virtual machines are like servers: it is a computer within a computer that provides the user the same experience as a physical system.
  • So Docker is not exactly a virtual machine (VM).

What are Kubernetes containers?

  • Kubernetes is an open-source platform from Google for running containers.
  • This is a container orchestration system for Docker containers that is more extensive than Docker Swarm and is meant to coordinate clusters of nodes at scale in production in an efficient manner.
  • You can use Kubernetes containers is mostly with Docker but can be used with other containers as well.

How do you stop a container?

Before we have decided to stop the container, We can check if there is any container running

The below command will display the list of containers which are currently running.

$sudo docker ps

Once you will get the list of container running, now to stop it use the below command

docker stop [OPTIONS] CONTAINER [CONTAINER]

Options:

–time , -t You can mention how many seconds to wait for stop before killing it

The default number of seconds the command will wait before killing the container is 10 seconds.

Example:

$ docker stop Demo_container

Azure web app for containers vs AKS

To Play with containers, Azure provides multiple options like Azure web app for containers, Azure Kubernetes Service (AKS), Azure Container Instance, etc. Now here, we will try to compare based on few parameters like Price, Features, scalability, tools provided etc.

Now, based on your requirement, you need to decide, with which one, you would like to go with.

Azure web app for containers vs container instances

In terms of Price

For Web app for containers, you need to pay only for the App plan you have. You can check out the complete pricing structure now.

Whereas, For AKS, you will just have to pay only for the virtual machine instances, networking resources and storage you are using. You can check out the complete pricing now.

In the case of the Azure Container instance, you need to pay only for the container group duration. You can check out the complete pricing now.

In terms of Provided Features

Web App Service for containers provides you different features like a few DNS names, public IP, SSL encryption, etc. Moreover, these features are quite easy to configure.

Whereas AKS also provides you with a different feature like SSL encryption, dns, Public IP, etc.

Azure Container Instance provides you public Ip and dns but one thing to note down here is, you won’t get SSL encryption here.

In terms of tools Provided

Web App Service for containers provides you with different tools like Kudu that help you to analyze your solution and along with this it also provides a few alerts.

Same way, AKS also provides you tools like Kudu that help you to connect to your application, It also provides you the control to your Virtual machines.

Whereas Azure Container Instance provides a few numbers of alert diagrams and container logs.

In terms of scalability

As we know application scalability is very much important. Web app service for containers is scalable with specific App plan. That you must select properly.

Whereas AKS is scalable by default with design.

Azure Container Instance provides a container group of instances. The container in the container group shares local networks, lifecycle, storage volumes, etc.

Azure Web App for Containers Pricing

You will get paid for the Azure web app for container based on the app service plan you have.

You can check out the complete pricing now.

You may also like the below articles

Conclusion

In this Azure tutorial, We discussed

  • Azure web app for containers
  • Create an Azure web app for containers
  • Azure Docker
  • What are Windows containers and Kubernetes containers?
  • Is Docker a VM?
  • How do you stop a container?
  • Azure web app for containers vs AKS
  • Azure web app for containers vs container instances
  • Azure Web App for Containers Pricing

Hope, you have enjoyed this article !!!