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.
14 lines
467 B
Docker
14 lines
467 B
Docker
# The one Dockerfile in the fabric that pack does not build: pack cannot pack
|
|
# itself. The native /v1/runner uses dockerfile.v0 to bootstrap this image, then
|
|
# every other repo builds with frontend=gateway.v0 + source=ghcr.io/hanzoai/pack.
|
|
FROM golang:1.23-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -o /pack .
|
|
|
|
FROM gcr.io/distroless/static-debian12
|
|
COPY --from=build /pack /pack
|
|
ENTRYPOINT ["/pack"]
|