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組成的,然后通過聯合掛載的方式掛載成一個文件系統。
假設你有以下的dockerfile:
FROM ubuntuENV http_proxy 10.144.xx.xx:8080ENTRYPOINT ["/usr/bin/bash"]首先你選擇了基礎鏡像ubuntu,這個鏡像有很多層。可以從/val/lib/docker下面找到該鏡像的信息和每一層的信息。
然后ENV是設置了一個環境變量,這句命令同樣會產生一個layer,再然后就是需要執行的命令,同樣會產生一個layer。如果你更改了某一層的信息,那么從這層之后所有的層都需要重新build。
更多的關于docke
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的docker build 变量_DockerFile 设置环境变量的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 楚乔传羽姑娘喜欢乌先生? 揭秘仲羽与乌道
- 下一篇: mssql导出数据到mysql_MSSQ
