docker buildx 调试构建
描述 | 开始构建 |
---|---|
用法 | docker buildx debug build [OPTIONS] PATH | URL | - |
别名 | docker buildx debug b |
该命令是实验性的
实验性功能旨在用于测试和反馈,因为它们的功能或设计可能会在版本之间发生变化而不发出警告,或者可能在未来的版本中完全删除。
描述
开始构建
选项
选项 | 默认 | 描述 |
---|---|---|
--add-host | 添加自定义主机到 IP 映射(格式host:ip :) | |
--allow | 允许额外的特权(例如network.host ,,security.insecure ) | |
--annotation | 为图像添加注释 | |
--attest | 证明参数(格式:type=sbom,generator=image ) | |
--build-arg | 设置构建时变量 | |
--build-context | 附加构建上下文(例如,名称=路径) | |
--cache-from | 外部缓存源(例如,user/app:cache ,type=local,src=path/to/dir ) | |
--cache-to | 缓存导出目标(例如,user/app:cache , type=local,dest=path/to/dir ) | |
--cgroup-parent | RUN 在构建期间为指令设置父 cgroup | |
--detach | 实验性 (CLI) 分离 buildx 服务器(仅在 Linux 上支持) | |
-f, --file | Dockerfile 的名称(默认值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 | 设置构建目标平台 | |
--print | 实验性 (CLI) 打印信息请求的结果(例如大纲、目标) | |
--progress | auto | 设置进度输出的类型(auto 、plain 、tty )。使用 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 | 设置要构建的目标构建阶段 | |
--ulimit | 极限选项 |