crunchloop / crunchloop/devcontainer

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

Đang mở
#8 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area/runtime enhancement
Ngôn ngữ chính
Go
Star
5
Fork
0
Merge trung bình
6 giờ 17 phút
Pull request đã merge (30 ngày)
15

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.