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

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.

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.

Login 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 container management and imaging platform.
  • This supports the operating system 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

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?

Leave a Comment