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守护进程。

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐