docker build命令是用来使用Dockerfile文件创建镜像
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