docker build 時的上下文


When you issue a docker build command, the current working directory is called the build context. By default, the Dockerfile is assumed to be located here, but you can specify a different location with the file flag (-f). Regardless of where the Dockerfile actually lives, all recursive contents of files and directories in the current directory are sent to the Docker daemon as the build context.

 

發出docker build命令時,當前工作目錄稱爲build context。默認情況下,Dockerfile假定位於此處,但可以使用文件標誌(-f)指定其他位置。不管Dockerfile實際位於何處,當前目錄中文件和目錄的所有遞歸內容都將作爲構建上下文發送到Docker守護進程。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章