mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
pack is the one packer for the fabric: detect a Go/Node/Python/static context and emit a runnable OCI image with no Dockerfile. Detection and LLB generation are pure functions (Detect + Recipe), unit-tested by marshalling the graph so no buildkitd is needed; build.go is the only impure code and drives BuildKit through dockerui, mirroring the reference dockerfile frontend. Pinned to moby/buildkit v0.16.0 to match the fabric daemon. A Dockerfile (dockerfile.v0) remains the escape hatch.
20 lines
594 B
Go
20 lines
594 B
Go
// Command pack is a BuildKit gateway frontend: the one zero-config packer for
|
|
// the Hanzo build fabric. buildkitd runs this image as the frontend, hands it
|
|
// the build context, and pack detects the ecosystem and emits a runnable OCI
|
|
// image with no Dockerfile. A Dockerfile (frontend=dockerfile.v0) is the
|
|
// escape hatch.
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/moby/buildkit/frontend/gateway/grpcclient"
|
|
"github.com/moby/buildkit/util/appcontext"
|
|
)
|
|
|
|
func main() {
|
|
if err := grpcclient.RunFromEnvironment(appcontext.Context(), build); err != nil {
|
|
log.Fatalf("pack: %v", err)
|
|
}
|
|
}
|