# Dockerfile.debian.ci — CI/release Debian image using pre-built binaries.
# Mirrors Dockerfile.ci but uses debian:bookworm-slim with shell tools
# so the agent can use shell-based tools (pwd, ls, git, curl, etc.).
# Used by release workflows to skip ~60 min QEMU cross-compilation.

# ── Runtime (Debian with shell) ────────────────────────────────
FROM debian:bookworm-slim

ARG TARGETARCH

# Install essential tools for agent shell operations
RUN apt-get update && apt-get install -y --no-install-recommends \
        bash \
        ca-certificates \
        curl \
        git \
    && rm -rf /var/lib/apt/lists/*

# Copy the pre-built binary for this platform (amd64 or arm64)
COPY bin/${TARGETARCH}/zeroclaw /usr/local/bin/zeroclaw

# Runtime directory structure and default config
COPY --chown=65534:65534 zeroclaw-data/ /zeroclaw-data/

ENV LANG=C.UTF-8
ENV ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace
ENV HOME=/zeroclaw-data
ENV ZEROCLAW_GATEWAY_PORT=42617

WORKDIR /zeroclaw-data
USER 65534:65534
EXPOSE 42617
ENTRYPOINT ["zeroclaw"]
CMD ["gateway"]
