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

  • Docker on Windows
  • Elton Stoneman
  • 290字
  • 2021-07-02 19:53:16

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 unityou can share your application by pushing your image to a Docker registry. Anyone who has access can pull that 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 that application in Docker, you build an image that is based on Windows Server Core, add IIS, 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 11 GB, but 10 GB of that is the Windows Server Core image you're using as a base, and that image can be shared as the base across many other images (I will cover image layers and caching more in Chapter 4, Pushing and Pulling Images from Docker Registries).

The Docker image is like a snapshot of the filesystem for one version of your application. The image is static, and you distribute it using a registry.

主站蜘蛛池模板: 鄂托克前旗| 板桥市| 元阳县| 陆川县| 桐庐县| 石首市| 鲁甸县| 宜兴市| 九江市| 阜新| 富裕县| 沅陵县| 邵东县| 镇坪县| 陇川县| 甘谷县| 龙里县| 庆城县| 宁阳县| 西峡县| 五常市| 如皋市| 河西区| 油尖旺区| 丁青县| 济源市| 磴口县| 志丹县| 濮阳县| 永善县| 三明市| 两当县| 双辽市| 英吉沙县| 湘阴县| 图们市| 灵台县| 卢湾区| 西平县| 札达县| 台安县|