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