Make Pipelines Docker-only with OpenCode and Pi
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers. Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent. Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
This commit is contained in:
+31
-4
@@ -1,14 +1,41 @@
|
||||
# Defaults are the last verified reproducible pins. Setup overrides them with
|
||||
# the current resolved release versions and immutable image digest; the moving
|
||||
# `latest` tag and version-only references are never used. OPENCODE_DIGEST has
|
||||
# no default so a bare build cannot silently fall back to a version tag.
|
||||
ARG OPENCODE_IMAGE=ghcr.io/anomalyco/opencode
|
||||
ARG OPENCODE_VERSION=2.0.26
|
||||
ARG OPENCODE_DIGEST
|
||||
ARG PI_VERSION=1.1.0
|
||||
|
||||
FROM golang:1.27-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -trimpath -o /out/pipelines-server ./cmd/pipelines-server
|
||||
RUN CGO_ENABLED=0 go build -trimpath -o /out/pipelines ./cmd/pipelines
|
||||
ARG PIPELINES_VERSION=dev
|
||||
ARG PIPELINES_COMMIT=unknown
|
||||
ARG PIPELINES_DIRTY=unknown
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-X git.a-wan.net/alan/pipelines/internal/buildinfo.Version=${PIPELINES_VERSION} -X git.a-wan.net/alan/pipelines/internal/buildinfo.Commit=${PIPELINES_COMMIT} -X git.a-wan.net/alan/pipelines/internal/buildinfo.Dirty=${PIPELINES_DIRTY}" -o /out/pipelines-server ./cmd/pipelines-server
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-X git.a-wan.net/alan/pipelines/internal/buildinfo.Version=${PIPELINES_VERSION} -X git.a-wan.net/alan/pipelines/internal/buildinfo.Commit=${PIPELINES_COMMIT} -X git.a-wan.net/alan/pipelines/internal/buildinfo.Dirty=${PIPELINES_DIRTY}" -o /out/pipelines ./cmd/pipelines
|
||||
|
||||
FROM ghcr.io/anomalyco/opencode:2.0.20
|
||||
FROM ${OPENCODE_IMAGE}@${OPENCODE_DIGEST}
|
||||
ARG OPENCODE_VERSION
|
||||
ARG OPENCODE_DIGEST
|
||||
ARG PI_VERSION
|
||||
ARG PIPELINES_VERSION=dev
|
||||
ARG PIPELINES_COMMIT=unknown
|
||||
ARG PIPELINES_DIRTY=unknown
|
||||
# Identity labels let setup verify the built image's actual source and harness
|
||||
# pins without a running-container probe or trusting a sidecar receipt file.
|
||||
LABEL net.a-wan.pipelines.opencode-version="${OPENCODE_VERSION}" \
|
||||
net.a-wan.pipelines.opencode-digest="${OPENCODE_DIGEST}" \
|
||||
net.a-wan.pipelines.pi-version="${PI_VERSION}" \
|
||||
net.a-wan.pipelines.source-version="${PIPELINES_VERSION}" \
|
||||
net.a-wan.pipelines.source-commit="${PIPELINES_COMMIT}" \
|
||||
net.a-wan.pipelines.source-dirty="${PIPELINES_DIRTY}"
|
||||
USER root
|
||||
RUN apk add --no-cache ca-certificates tzdata git curl \
|
||||
RUN apk add --no-cache ca-certificates tzdata git curl nodejs npm python3 \
|
||||
&& npm install --global --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} \
|
||||
&& addgroup -g 10001 pipelines \
|
||||
&& adduser -D -u 10001 -G pipelines -h /home/pipelines pipelines \
|
||||
&& mkdir -p /data /workspace \
|
||||
|
||||
Reference in New Issue
Block a user