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

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

主站蜘蛛池模板: 神农架林区| 凤山市| 博罗县| 乐清市| 永城市| 镇巴县| 德保县| 九龙坡区| 如东县| 景东| 清原| 双牌县| 咸阳市| 五河县| 马边| 淄博市| 大庆市| 瑞金市| 石台县| 五台县| 吉林省| 太仆寺旗| 永州市| 景东| 土默特右旗| 马鞍山市| 资溪县| 玉山县| 麻城市| 木兰县| 沐川县| 玛纳斯县| 包头市| 五大连池市| 英山县| 庆元县| 宝丰县| 北海市| 岳普湖县| 天镇县| 正镶白旗|