crunchloop / crunchloop/devcontainer

BuildKit detection probe in runtime/docker (design §13.2)

未关闭
#8 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area/runtime enhancement
主要语言
Go
星标
5
派生
0
平均合并
6 小时 17 分钟
30 天内合并 PR
15

描述

Per design/runtime.md §13.2: prefer BuildKit if available, fall back to classic. Today `runtime/docker/build.go` calls `ImageBuild` without setting `Version`, so we get whatever the daemon defaults to.

### Plan

- Probe `Info.BuilderVersion` (or check for `buildkit` capabilities) at `docker.New()`
- Cache result on `*Runtime`
- In `BuildImage`, set `opts.Version = build.BuilderBuildKit` when supported
- Fall back to classic with a warning if a buildkit-only construct (e.g. `# syntax=...`) appears in the user's Dockerfile but the daemon has no buildkit

### Why now

Our generated feature dockerfile starts with `# syntax=docker/dockerfile:1.4`. Classic ignores this as a comment so today's flow works, but cache mounts and other syntax-1.4 features won't apply unless buildkit is on.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。