What is a container application
Traditional virtual machine is the virtualization of hardware resources
The virtualization level of the container is one level higher than that of the virtual machine. It is the virtualization of the operating system.
A container application is a software package composed of the software itself and dependent components. It can run on a system with a container engine installed.
The composition method of the container application is docker image. The docker image can be divided into multiple layers, the top layer is writable, and the other layers are read-only. The following is an example of a docker image:
Compared with ordinary applications, container applications have the following characteristics:
- system resource utilization rate
Since the container does not require additional overhead such as hardware virtualization and running a complete operating system, the container has a higher utilization rate of system resources.
- Start faster
The container application runs on the host kernel and does not need to start a complete operating system, so it can achieve a startup time of seconds or even milliseconds.
- operating environment is always the same
A common problem in the development process is environmental consistency. The container application provides a complete runtime environment except for the kernel, ensuring the consistency of the application runtime environment.
- easy migration
The container runtime ensures the consistency of the execution environment, so application migration is easier.
- easy maintenance and expansion
The hierarchical storage image used by the container engine makes it easier to reuse the repeated parts of the application, and also makes the maintenance and update of the application easier. It is also very simple to further expand the image based on the basic image.
Quickly test container applications
The test process is as follows:
Azure Container Instance is a solution that provides a running solution for hosting serverless container applications. It provides the easiest way to run containers, you don't need to manage virtual machines, and you don't need to manage other service environments.
Let's take a look at how to quickly deploy and test a container application:
- prepares resource .
After logging in, we first create a resource group.
az group create --name acitest --location eastus
- deployment application.
That is, put our application in the container warehouse, and then start deployment. We need to write down the content of fqdn in the output:
az container create --resource-group acutest --name mycontainer --image mcr.microsoft.com/
azuredocs/aci-helloworld --dns-name-label aci-my-demo --ports 80
- started testing.
- Delete the resource and end the test.
az group delete --name acitest
common problem
1. My test application needs to access intranet resources, can I?
Answer: Azure container instances support virtual networks and can access intranet resources. See:
2. Does Azure Container Instance support Windows containers?
Answer: Support. Azure container instances support the following Windows Server 2016 and Windows Server 2019. For more information, please refer to:
3. Are Azure container instances available in China?
Answer: At present, we have launched Azure container instances in East Second District.
4. Which container registry does Azure container instance support?
Answer: Azure container instance supports docker hub, Azure Container Registry and third-party registry. These registries must be accessible from the Internet.
5. My test environment is expensive and may use thousands of CPU cores. Can I use Azure container instances for testing?
Answer: In some cases, it is possible, but you need to contact the technical support case. For more information, please refer to:
https://docs.microsoft.com/zh-cn/azure/container-instances/container-instances-quotas
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。