crunchloop / crunchloop/devcontainer

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

オープン
#8 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area/runtime enhancement
主要言語
Go
スター
5
フォーク
0
平均マージ
6時間 17分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。