Docker BuildX 检查

描述检查当前生成器实例
用法docker buildx inspect [NAME]

描述

显示有关当前或指定生成器的信息。

选项

选择违约描述
--bootstrap在检查之前确保 builder 已启动

例子

在检查之前确保生成器正在运行 (--bootstrap)

使用--bootstrap选项,以确保生成器在 检查它。如果驱动程序是docker-container然后--bootstrap开始 BuildKit 容器并等待它运行。Bootstrapping 是 在构建过程中自动完成,因此没有必要。相同的 BuildKit container 在关联的生成器节点的生命周期内使用(因为 显示在buildx ls).

覆盖配置的生成器实例 (--builder)

等同buildx --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

debugflag 还可用于获取有关构建器的更多信息:

$ docker --debug buildx inspect elated_tesla