archie-agent 3.92GB -> 1.43GB, archied 475MB -> 251MB. - rm -rf /go/pkg/mod/cache cleared the wrong thing: it left the extracted module sources and the whole GOCACHE in the image, so that layer was 2.23GB to deliver 168MB of binaries. - /go/bin was never on PATH, so golangci-lint, gofumpt, buf and dlv shipped as unreachable dead weight. - Replace go install with pinned upstream release binaries. delve is dropped: it publishes no prebuilt binary and was the only thing forcing a compile step. go install it at runtime if needed. - beads from its Go release rather than npm, and drop dolt entirely -- bd runs Dolt embedded. - uv manages Python; no apt Python, no deadsnakes, one version. - debian:trixie-slim base, Node copied from node:24-trixie-slim. - archied drops Node: the builtin tools cover what desktop-commander did, and archied registers MCP providers itself and hard-fails the process when one cannot start. Add .dockerignore: the build context was shipping .git, docs/, bin/ and two host-built binaries into every COPY.
36 lines
1.6 KiB
Docker
36 lines
1.6 KiB
Docker
# archied — the archie daemon, built as a standalone container.
|
|
# Run via docker compose alongside NATS.
|
|
|
|
FROM golang:1.26-trixie AS builder
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
ARG GATEWAY_VERSION=dev
|
|
ARG RUNTIME_VERSION=dev
|
|
RUN CGO_ENABLED=0 go build \
|
|
-ldflags "-X main.gatewayVersion=${GATEWAY_VERSION} -X main.runtimeVersion=${RUNTIME_VERSION}" \
|
|
-o /usr/local/bin/archied ./cmd/archied/
|
|
# archied is static, but this can't be scratch: in inprocess mode the daemon
|
|
# runs agent tools itself, and the shell tool invokes bash; codesearch shells
|
|
# to git. Worktrees don't count — internal/worktree uses go-git. ripgrep is
|
|
# embedded in the binary, so grep/find need nothing installed.
|
|
#
|
|
# No Node: the builtin tools (read/write/edit/find/grep/shell/test) cover what
|
|
# desktop-commander did. Any npx-launched MCP stdio server will now fail to
|
|
# start, and a failed provider rolls back the tool-provider family and exits
|
|
# the daemon — so remove tools.mcp_servers entries needing npx before
|
|
# deploying this image.
|
|
FROM debian:trixie-slim
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates git && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
COPY --from=builder /usr/local/bin/archied /usr/local/bin/archied
|
|
ARG GATEWAY_VERSION=dev
|
|
ARG RUNTIME_VERSION=dev
|
|
LABEL org.opencontainers.image.version="${GATEWAY_VERSION}"
|
|
LABEL cloud.catlow.archie.runtime-version="${RUNTIME_VERSION}"
|
|
COPY CHANGELOG.archied.md /usr/share/archie/CHANGELOG.archied.md
|
|
COPY CHANGELOG.archie.md /usr/share/archie/CHANGELOG.archie.md
|
|
ENTRYPOINT ["archied"]
|