docker Archives - Learn Smart Coding https://blogs.learnsmartcoding.com/tag/docker/ Everyone can code! Wed, 05 Feb 2020 05:09:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 209870635 How to Create an Azure Web App for containers https://blogs.learnsmartcoding.com/2020/02/05/how-to-create-an-azure-web-app-for-containers/ https://blogs.learnsmartcoding.com/2020/02/05/how-to-create-an-azure-web-app-for-containers/#respond Wed, 05 Feb 2020 05:09:29 +0000 https://karthiktechblog.com/?p=368 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 […]

The post How to Create an Azure Web App for containers appeared first on Learn Smart Coding.

]]>
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.

The post How to Create an Azure Web App for containers appeared first on Learn Smart Coding.

]]>
https://blogs.learnsmartcoding.com/2020/02/05/how-to-create-an-azure-web-app-for-containers/feed/ 0 368
What are containers and their benefits https://blogs.learnsmartcoding.com/2020/02/01/what-are-containers-and-their-benefits-in-software-industry/ https://blogs.learnsmartcoding.com/2020/02/01/what-are-containers-and-their-benefits-in-software-industry/#respond Sat, 01 Feb 2020 01:20:33 +0000 https://karthiktechblog.com/?p=360 Introduction In this short post, I explain what are containers and their benefits. To help understand what problems does this container solves in the software industry. What are containers? A software container is a pretty abstract thing and it will be easy if we start with an analogy that is familiar to most of the […]

The post What are containers and their benefits appeared first on Learn Smart Coding.

]]>
Introduction

In this short post, I explain what are containers and their benefits. To help understand what problems does this container solves in the software industry.

What are containers?

A software container is a pretty abstract thing and it will be easy if we start with an analogy that is familiar to most of the readers. The analogy is a shipping container in the transportation industry.

Let me demonstrate with an example. A construction company from one city brings in Concrete Bricks in a truck to the port and then transferred to a ship that will transport the Concrete Bricks overseas.
Likewise, another construction company brings in Burnt Clay Bricks to the same port to get it transferred to overseas.

Every type of goods was packaged in its own way and thus had to be handled in its own way.

Any loose goods risked being stolen or damaged in the process. Then, there came the container, and it totally revolutionized the transportation industry.

The container is just a metallic box with standardized dimensions. The length, width, and height of each container is the same. This is a very important point. Without the world agreeing on a standard size, shipping containers would not have become so successful.

What are containers
containers

Example

If a company wants to transport their goods from point A to point B, they simply call transport company and specify the place where goods are present. Transport company then transport the goods in the container which is a metallic box with standardized dimensions.

Containers with fixed dimensions

By now you should have some good understanding of why shipping containers are so important.

Let’s understand what happens in our software world. When a developer develops a new application and completes it, they would hand this application to the operation team. Operation team installs 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 created quite different types of applications. All the installation has to go 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 other application installations.

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. Now 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.

If you relate this with transportation company carrying one container from one construction company in a huge ship!!

Rescue

Then comes to rescue the software packaging mechanism was the Docker container. Developers use Docker containers to package their applications, frameworks, and libraries, and then they ship those containers to the operations team or to the testers.

The container is just a black box. Crucially, it is a standardized black box. All containers, no matter what application it has and runs inside them, can be treated equally. Now with this in place, our problems that operation team had has solved completely.

Containers is helpful to package the software into Standardized Units for Development, Shipment and Deployment.

example of application hosted in a single server using multiple containers

Why are containers important?

Improving security, Simulating production-like environments and Standardizing infrastructure.

As you know there are many cyber attacks starting from a small company to big giants like Microsoft. Many well known companies by security breaches and Highly sensitive customer data lost every day.

Containers can help in many way. One of the way is that container images are immutable, it is easy to have them scanned for known vulnerabilities and exposures, and in doing so, increase the overall security of our applications.

Apart from security, container can be helpful to Simulate production-like environments in local laptop. The operation team can now standardize their infrastructure as containers are standard. Every server becomes just another Docker host. Operation team no need to know knowledge on what application is running inside the container.

Resources

To know more about docker containers, visit docker resource.

Conclusion

In this post, I explained with simple example on what are containers and their benefits. The details in this post will help to cover a part of knowledge required to complete 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.

The post What are containers and their benefits appeared first on Learn Smart Coding.

]]>
https://blogs.learnsmartcoding.com/2020/02/01/what-are-containers-and-their-benefits-in-software-industry/feed/ 0 360