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:cachetype=local,src=path/to/dir
--cache-to缓存导出目标(例如,user/app:cache, type=local,dest=path/to/dir
--cgroup-parentRUN在构建期间为指令设置父 cgroup
--detach实验性 (CLI) 分离 buildx 服务器(仅在 Linux 上支持)
-f, --fileDockerfile 的名称(默认值PATH/Dockerfile:)
--iidfile将图像 ID 写入文件
--label设置图像的元数据
--load简写为--output=type=docker
--metadata-file将构建结果元数据写入文件
--networkRUN在构建期间设置指令的网络模式
--no-cache构建镜像时不要使用缓存
--no-cache-filter不缓存指定阶段
-o, --output输出目的地(格式:type=local,dest=path
--platform设置构建目标平台
--print实验性 (CLI) 打印信息请求的结果(例如大纲、目标)
--progressauto设置进度输出的类型(autoplaintty)。使用 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极限选项