docker buildx inspect
| 描述 | 检查当前构建器实例 |
|---|---|
| 用法 | docker buildx inspect [名称] |
描述
显示当前或指定构建器的信息。
选项
| 选项 | 默认值 | 描述 |
|---|---|---|
--bootstrap | 在检查前确保构建器已启动 |
示例
在检查前确保构建器正在运行(--bootstrap)
使用`--bootstrap`选项可确保构建器在检查前正在运行。如果驱动程序是`docker-container`,则`--bootstrap`会启动BuildKit容器并等待其运行。构建期间会自动进行引导,因此没有必要。在关联构建器节点的生命周期内(如`buildx ls`所示),使用相同的BuildKit容器。
覆盖已配置的构建器实例(--builder)
获取构建器实例的信息
默认情况下,`inspect`显示当前构建器的信息。指定要检查的构建器名称以获取该构建器的信息。以下示例显示了名为`elated_tesla`的构建器实例的信息
注意节点构建平台旁边的星号(`*`)表示它们是在`buildx create`期间手动设置的。否则平台是自动检测的。
$ docker buildx inspect elated_tesla
Name: elated_tesla
Driver: docker-container
Last Activity: 2022-11-30 12:42:47 +0100 CET
Nodes:
Name: elated_tesla0
Endpoint: unix:///var/run/docker.sock
Driver Options: env.BUILDKIT_STEP_LOG_MAX_SPEED="10485760" env.JAEGER_TRACE="localhost:6831" image="moby/buildkit:latest" network="host" env.BUILDKIT_STEP_LOG_MAX_SIZE="10485760"
Status: running
Flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
BuildKit: v0.10.6
Platforms: linux/arm64*, linux/arm/v7, linux/arm/v6
Labels:
org.mobyproject.buildkit.worker.executor: oci
org.mobyproject.buildkit.worker.hostname: docker-desktop
org.mobyproject.buildkit.worker.network: host
org.mobyproject.buildkit.worker.oci.process-mode: sandbox
org.mobyproject.buildkit.worker.selinux.enabled: false
org.mobyproject.buildkit.worker.snapshotter: overlayfs
GC Policy rule#0:
All: false
Filters: type==source.local,type==exec.cachemount,type==source.git.checkout
Keep Duration: 48h0m0s
Keep Bytes: 488.3MiB
GC Policy rule#1:
All: false
Keep Duration: 1440h0m0s
Keep Bytes: 24.21GiB
GC Policy rule#2:
All: false
Keep Bytes: 24.21GiB
GC Policy rule#3:
All: true
Keep Bytes: 24.21GiB
`debug`标志也可用于获取有关构建器的更多信息
$ docker --debug buildx inspect elated_tesla