[英]Dockerfile naming, .dockerfile vs Dockerfile
I'm new to Dockerfile nomenclature and have noticed a few different examples of dockerfiles in repos throughout my org including the following types: 我是Dockerfile术语的新手,在我的组织中的存储库中注意到了一些不同的Dockerfile文件示例,包括以下类型:
Is there somewhere I can find a detailed explanation for the different use cases and purposes of each? 在某处可以找到针对每种用例和用途的详细说明吗?
docker build [OPTIONS] PATH | URL | -
docker build [OPTIONS] PATH | URL | -
This is the build command for docker, details here . docker build [OPTIONS] PATH | URL | -
这是docker的构建命令,详细信息在这里 。
docker build
command expects the file name as exactly Dockerfile
. Dockerfile
docker build
命令期望文件名与Dockerfile
完全相同。 So, in that case, you can simply say 因此,在这种情况下,您可以简单地说
docker build .
On the other cases, you have to specify the full name as 在其他情况下,您必须将全名指定为
docker build -f Dockerfile.build .
So the file name has nothing to do with the container itself. 因此,文件名与容器本身无关。 Those naming are for your own convenience.
这些命名是为了您自己的方便。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.