4-Docker命令之docker build

1.docker build介绍

docker build命令是用来使用Dockerfile文件创建镜像

2.docker build用法

docker build [参数] PATH | URL | -

[root@centos79 ~]# docker build --help

Usage:  docker buildx build [OPTIONS] PATH | URL | -

Start a build

Aliases:
  docker buildx build, docker buildx b

Options:
      --add-host strings              Add a custom host-to-IP mapping (format: "host:ip")
      --allow strings                 Allow extra privileged entitlement (e.g., "network.host", "security.insecure")
      --attest stringArray            Attestation parameters (format: "type=sbom,generator=image")
      --build-arg stringArray         Set build-time variables
      --build-context stringArray     Additional build contexts (e.g., name=path)
      --builder string                Override the configured builder instance (default "default")
      --cache-from stringArray        External cache sources (e.g., "user

猜你喜欢

转载自blog.csdn.net/z19861216/article/details/134798651