# --- Stage 1: Builder --- # Wir nutzen 'latest', damit wir immer die neuste Go-Version (>= 1.25) haben FROM golang:latest AS builder # Git und Make installieren RUN apt-get update && apt-get install -y git make WORKDIR /app # Repo klonen RUN git clone https://github.com/sipeed/picoclaw.git . # Bauen RUN make build # --- Stage 2: Runtime --- # Python Umgebung für die Web-App (Debian-basiert, passt zum Builder) FROM python:3.10-slim # Git installieren (optional für PicoClaw Skills) RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* WORKDIR /root/ # Gradio für das Web-Interface installieren RUN pip install gradio # Binary aus Stage 1 holen COPY --from=builder /app/build/picoclaw . # Config-Ordner anlegen & Configs kopieren RUN mkdir -p /root/.picoclaw COPY config.json /root/.picoclaw/config.json COPY config.json ./config.json # Die Web-App (app.py) kopieren COPY app.py . # Port exposen EXPOSE 7860 # Startbefehl CMD ["python", "app.py"]