docker buildx debug build

描述开始构建
用法docker buildx debug build [OPTIONS] PATH | URL | -
别名
docker build docker builder build docker image build docker buildx b

实验性功能

此命令为实验性功能。

实验性功能旨在用于测试和反馈,因为它们的功能或设计可能会在版本之间发生更改,恕不另行通知,或者可能在将来的版本中完全删除。

描述

开始构建

选项

选项默认值描述
--add-host添加自定义主机到 IP 映射(格式:host:ip
--allow允许额外的特权权限(例如,network.hostsecurity.insecure
--annotation向镜像添加注释
--attest证明参数(格式:type=sbom,generator=image
--build-arg设置构建时变量
--build-context附加构建上下文(例如,name=path)
--cache-from外部缓存源(例如,user/app:cachetype=local,src=path/to/dir
--cache-to缓存导出目标(例如,user/app:cachetype=local,dest=path/to/dir
--callbuild设置评估构建的方法(checkoutlinetargets
--cgroup-parent设置构建期间RUN指令的父cgroup
--check--call=check的简写
--detach实验性功能 (CLI) 分离 buildx 服务器(仅在 Linux 上支持)
-f, --fileDockerfile 的名称(默认值:PATH/Dockerfile
--iidfile将镜像 ID 写入文件
--label设置镜像的元数据
--load--output=type=docker的简写
--metadata-file将构建结果元数据写入文件
--network设置构建期间RUN指令的网络模式
--no-cache构建镜像时不使用缓存
--no-cache-filter不缓存指定的阶段
-o, --output输出目标(格式:type=local,dest=path
--platform设置构建的目标平台
--progressauto设置进度输出的类型(autoplainttyrawjson)。使用 plain 显示容器输出
--provenance--attest=type=provenance的简写
--pull始终尝试拉取所有引用的镜像
--push--output=type=registry的简写
-q, --quiet抑制构建输出并在成功时打印镜像 ID
--root实验性功能 (CLI) 指定要连接的服务器的根目录
--sbom--attest=type=sbom的简写
--secret要公开给构建的密钥(格式:id=mysecret[,src=/local/secret]
--server-config实验性功能 (CLI) 指定 buildx 服务器配置文件(仅在启动新服务器时使用)
--shm-size构建容器的共享内存大小
--ssh要公开给构建的 SSH 代理套接字或密钥(格式:default|<id>[=<socket>|<key>[,<key>]]
-t, --tag名称和可选标签(格式:name:tag
--target设置要构建的目标构建阶段
--ulimitUlimit 选项