Files
archie/Dockerfile.archied
T
sam be4e9f596c fix(docker): install unzip and Node 24 so MCP servers can start
archied crash-looped on startup: mcp.desktop-commander failed with
"transport closed while waiting for response", which failed the whole
tool-provider family and exited the daemon.

The proximate cause was a missing unzip. desktop-commander depends on
puppeteer, whose postinstall extracts a downloaded browser and aborts
with "no zip archiver is available" without it, so npx exited before
writing a byte. Node also moves to 24 from nodesource, matching the
worker image: Ubuntu 24.04 ships Node 18 and several of the server's
transitive dependencies require >=20 or >=22.

Verified in the built image: npx now completes an MCP initialize
handshake and exits 0.
2026-07-30 22:42:16 +10:00

42 lines
1.8 KiB
Docker

# archied — the archie daemon, built as a standalone container.
# Run via docker compose alongside NATS.
FROM golang:1.26-bookworm 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/
FROM ubuntu:24.04
# This image launches MCP stdio servers via npx, so its Node toolchain is
# load-bearing: when an MCP server fails to start, the tool-provider family
# rolls back and the daemon exits.
#
# Node 24 from nodesource, matching the worker image. Ubuntu 24.04 ships Node
# 18, and desktop-commander -- though it declares engines >=18 -- pulls
# dependencies requiring >=20 and >=22.
#
# unzip is required because desktop-commander depends on puppeteer, whose
# postinstall extracts a downloaded browser archive and fails with "no zip
# archiver is available" without it. That install failure is what actually
# killed startup: npx exited before writing a byte, and the MCP client
# reported "transport closed while waiting for response".
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl git unzip && \
curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \
apt-get install -y --no-install-recommends nodejs && \
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"]