docker build 变量_DockerFile 设置环境变量
鏡像的Layer
在docker docs里面有一句話:
We’ve already seen that Docker images are read-only templates from which Docker containers are launched. Each image consists of a series of layers. Docker makes use of union file systems to combine these layers into a single image. Union file systems allow files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system.
對于docker的images,是由一層層的layer組成的,然后通過聯(lián)合掛載的方式掛載成一個文件系統(tǒng)。
假設(shè)你有以下的dockerfile:
FROM ubuntuENV http_proxy 10.144.xx.xx:8080ENTRYPOINT ["/usr/bin/bash"]首先你選擇了基礎(chǔ)鏡像ubuntu,這個鏡像有很多層。可以從/val/lib/docker下面找到該鏡像的信息和每一層的信息。
然后ENV是設(shè)置了一個環(huán)境變量,這句命令同樣會產(chǎn)生一個layer,再然后就是需要執(zhí)行的命令,同樣會產(chǎn)生一個layer。如果你更改了某一層的信息,那么從這層之后所有的層都需要重新build。
更多的關(guān)于docke
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的docker build 变量_DockerFile 设置环境变量的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 楚乔传羽姑娘喜欢乌先生? 揭秘仲羽与乌道
- 下一篇: argb888与rgb888转换程序_一