FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive # System dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ curl unzip python3 python3-pip jq ca-certificates bc git iptables \ && ln -sf /usr/bin/python3 /usr/bin/python \ && rm -rf /var/lib/apt/lists/* # Install Bun (OpenCode runtime) RUN curl -fsSL https://bun.sh/install | bash ENV PATH="/root/.bun/bin:$PATH" # Install Node.js 20 RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs \ && rm -rf /var/lib/apt/lists/* # Install OpenCode RUN npm i -g opencode-ai@latest # Python analysis packages (only numpy + pandas for agent) RUN pip3 install --break-system-packages pandas numpy # ── System files (agent cannot see these) ── # SSE bridge + mission runner COPY opencode-workspace/sse-bridge.ts /opt/system/sse-bridge.ts COPY opencode-workspace/run-mission.py /opt/system/run-mission.py # Experiment configs (only used by entrypoint to generate MISSION.md) COPY experiments/ /opt/system/experiments/ # Entrypoint COPY opencode-workspace/entrypoint.sh /opt/system/entrypoint.sh RUN chmod +x /opt/system/entrypoint.sh # ── Agent workspace (clean, only what agent should see) ── WORKDIR /workspace RUN mkdir -p /workspace/agent_records EXPOSE 4096 ENTRYPOINT ["/opt/system/entrypoint.sh"] CMD ["serve"]