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

Building a Docker image

Docker images are layered. The bottom layer is the operating system, which can be a full OS like Windows Server Core, or a minimal OS like Microsoft Nano Server. On top of that are layers for each change you make to the base OS when you build an image - by installing software, copying files, and running commands. Logically, Docker treats the image as a single unit, but physically, each layer is stored as a separate file in Docker's cache, so images with a lot of common features can share layers from the cache.

Images are built using a text file with the Dockerfile language - specifying the base OS image to start with, and all the steps to add on top. The language is very simple, and there are only a few commands you need to master in order to build production-grade images. I'll start by looking at the basic PowerShell image I've been using so far in this chapter.

主站蜘蛛池模板: 宁城县| 宝丰县| 波密县| 普安县| 浏阳市| 临猗县| 安塞县| 正镶白旗| 乐业县| 沧源| 抚州市| 桃江县| 定州市| 商河县| 雷州市| 宁化县| 奉节县| 灵寿县| 磐石市| 西峡县| 安溪县| 齐齐哈尔市| 凭祥市| 和硕县| 定西市| 油尖旺区| 福海县| 班玛县| 麻城市| 剑川县| 金秀| 正安县| 博白县| 莱阳市| 突泉县| 塔城市| 缙云县| 伊通| 安义县| 黑河市| 定西市|