Build an image from a Dockerfile。
根据Dockerfile文件构建镜像。

指定自定义Dockerfile构建镜像

lets you specify the path to an alternative file to use instead
应用场景:

  1. 兼容多个平台时,可能需要指定相应的不同的Dockerfile构建镜像
  2. This is useful in cases where the same set of files are used for multiple builds.
    1. docker build -f Dockerfile_arm -t imageName .
    Dockerfile_arm是自定义得Dockerfile文件。

资料

  1. docker build