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

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.

主站蜘蛛池模板: 和龙市| 洪湖市| 吴旗县| 托里县| 兴义市| 疏附县| 太仆寺旗| 陆丰市| 镇原县| 易门县| 长武县| 博罗县| 竹山县| 屯门区| 思南县| 遂川县| 阿拉善盟| 安康市| 闸北区| 五常市| 辰溪县| 包头市| 得荣县| 吴江市| 孟津县| 安乡县| 曲靖市| 保定市| 四会市| 华蓥市| 宽城| 亳州市| 高要市| 汝阳县| 金阳县| 武宁县| 昆山市| 满城县| 蒲江县| 云安县| 吉首市|