官术网_书友最值得收藏!

  • Docker on Windows
  • Elton Stoneman
  • 290字
  • 2021-07-02 12:47:52

Docker images

A Docker image is a complete application package. It contains one application and all of its dependencies: the language runtime, the application host, and the underlying operating system. Logically the image is a single file, and it's a portable unit – you can share your application by pushing your image to a Docker registry. Anyone who has access can pull the image themselves and run your application in a container; it will behave in exactly the same way for them as it does for you.

Here's a concrete example. An ASP.NET WebForms app is going to run on Internet Information Services (IIS) in Windows Server. To package the application in Docker, you build an image that is based on Windows Server Core, add IIS, then add ASP.NET, copy your application, and configure it as a website in IIS. You describe all these steps in a simple script called a Dockerfile, and you can use PowerShell or batch files for each step you need to perform.

You build the image by running docker image build. The input is the Dockerfile and any resources that need to be packaged into the image (like the web application content). The output is a Docker image. In this case, the image will have a logical size of about 5 GB, but 4 GB of this will be the Windows Server Core image you're using as a base, and the image can be shared as the base across many other images. (I will cover image layers and caching more in Chapter 4, Sharing Images with Docker Registries.)

A Docker image is like a snapshot of the filesystem for one version of your application. Images are static, and you distribute them using an image registry.

主站蜘蛛池模板: 嵩明县| 二连浩特市| 江门市| 宝丰县| 巍山| 靖宇县| 金湖县| 沙洋县| 洪江市| 新兴县| 黄石市| 辰溪县| 仁怀市| 湘潭县| 汝州市| 勃利县| 西盟| 虞城县| 蒙城县| 阜康市| 黄平县| 亳州市| 大同市| 岑溪市| 遂川县| 武功县| 绥德县| 余江县| 格尔木市| 辰溪县| 常州市| 永仁县| 长海县| 沙湾县| 惠安县| 安顺市| 吉木萨尔县| 汕尾市| 永登县| 女性| 定边县|