|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/docker-the-complete-guide/
课程评论:没有评论
课程名称:Docker - 完整指南 课程概述: 本课程旨在帮助学习者理解虚拟机和容器的概念,主要内容包括虚拟机的定义、Docker的优势以及Docker的架构。 1. **虚拟机的定义**:虚拟机是一种计算机文件,通常被称为镜像,它表现得像一个实际的计算机,实际上是“计算机内的计算机”。用户在虚拟机上运行程序时,体验与在宿主操作系统上运行相同。 2. **Docker和它的优势**:Docker是一个开源平台,用于通过使用容器开发、交付和运行应用程序。Docker使您能够将应用程序与基础设施分离,从而能够更快速地交付软件。此外,您可以像管理应用程序一样管理基础设施。Docker平台利用Docker Engine快速构建和打包应用程序,这些应用程序作为Docker镜像使用Dockerfile格式的文件创建,随后在分层容器中部署和运行。 3. **Docker的主要优势**: - 资源效率:Docker轻量且快速,与使用虚拟机虚拟化整个硬件服务器相比,容器的进程级隔离和使用容器主机内核的方式更加高效。 4. **Docker架构及其分类**:Docker Engine是一个客户端-服务器应用程序,主要包括五个组件: - 服务器(即长时间运行的守护进程) - REST API,允许程序与守护进程通信并指示其操作。 5. **手动创建镜像的步骤**: - 第一步:更新代码 - 创建一个新项目 - HelloWebApp(命令:dotnet new MVC -n HelloWebApp) - 添加如下Dockerfile。 6. **Azure管道用于构建和发布Docker镜像到Docker Hub**:Azure管道可以用来构建包含Dockerfile的任何库的镜像,可以根据构建使用的代理平台构建Linux和Windows容器。 7. **部署到Web应用程序**:在每次成功构建后,您可以将应用程序自动部署到Linux容器的Azure Web App中。 通过本课程,学习者将掌握Docker的基础知识及其在现代应用程序开发和部署中的重要性。
Understanding Virtual Machines and ContainersWhat is a Virtual Machine• A virtual machine is a computer file, typically called an image, which behaves like an actual computer - a computer within a computer• It runs in a window, much like any other program, giving the end-user the same experience on a virtual machine as they would have on the host operating system itself.• Multiple virtual machines can run simultaneously on the same physical computer.What is Docker and its Benefits• Docker is an open-source platform for developing, shipping and running applications by using containers.• Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.• With Docker, you can manage your infrastructure in the same ways you manage your applications.The Docker platform uses the Docker Engine to quickly build and package apps as Docker images created using files written in the Dockerfile format that then is deployed and run in a layered container.Benefits of Docker:1. Resource Efficiency: Docker is lightweight and fast. Process level isolation and usage of the container host's kernel is more efficient when compared to virtualizing an entire hardware server using VM.Docker Architecture and its TaxonomyDocker Engine is a client-server application with these major components:• A server which is a type of long-running program called a daemon process.• A REST API that specifies interfaces that programs can use to talk to the daemon and instruct it on what to do.Create an Image ManuallyStep 1: Update the Code1. Create a New Project - HelloWebApp dotnet new MVC -n HelloWebApp2. Add docker file as below DockerfileAzure Pipeline for Build and Publish Docker Image to Docker HubAzure Pipelines can be used to build images for any repository containing a Dockerfile. The building of both Linux and Windows containers is possible based on the agent platform used for the build.Deploying to Web AppYou can automatically deploy your application to an Azure Web App for Linux Containers after every successful build.