rdev/Dockerfile
jordan e42c18a9a3 feat: add session web UI mode + aeries-daeya cookbook tree
Session WebUI:
- Add `web_ui` flag to session create — launches claude-code-ui in pod on port 3001
- Install @siteboon/claude-code-ui in claudebox Dockerfile, expose port 3001
- Migration 027: add web_ui column to sessions table
- startWebUI/stopWebUI fire-and-forget helpers in SessionsHandler
- Service selects preview port 3001 (web UI) vs 8080 (sidecar) based on flag

Aeries Daeya cookbook:
- Add cookbooks/trees/aeries-daeya.yaml: privacy-first avatar social platform
  (infra → avatar data model → AI generation pipeline → studio UI)
- Add cookbooks/scripts/aeries-daeya-test.sh: run/status/diagnose/teardown harness
- Fix race condition in common.sh wait_for_pipeline: detect already-running pipelines
  at startup and track directly instead of waiting for a newer one

Docs/tooling:
- Add SDK Update Workflow section to CLAUDE.md
- Add `make sdk` and `make sdk-check` targets for OpenAPI spec management

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 23:14:08 -07:00

67 lines
1.9 KiB
Docker

# rdev claudebox - Claude Code in a container
# v0.5 - HTTP sidecar mode (replaces kubectl exec)
# Build stage for Go binaries
FROM golang:1.25-alpine AS builder
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o sdlc ./cmd/sdlc && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o claudebox-sidecar ./cmd/claudebox-sidecar
# Runtime stage
FROM ubuntu:22.04
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
vim \
build-essential \
ca-certificates \
gnupg \
openssh-client \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 20 (required for Claude Code CLI)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install Claude Code CLI and web UI
RUN npm install -g @anthropic-ai/claude-code @siteboon/claude-code-ui
# Copy Go binaries from builder stage
COPY --from=builder /build/sdlc /usr/local/bin/sdlc
COPY --from=builder /build/claudebox-sidecar /usr/local/bin/claudebox-sidecar
# Configure git for rdev-bot identity
RUN git config --global user.name "rdev-bot" \
&& git config --global user.email "rdev@orchard9.ai" \
&& git config --global init.defaultBranch main \
&& git config --global push.autoSetupRemote true
# Create workspace directory
RUN mkdir -p /workspace
# Create SSH directory with correct permissions
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
# Set working directory
WORKDIR /workspace
# Create a simple healthcheck script
RUN echo '#!/bin/bash\nclaude --version > /dev/null 2>&1' > /healthcheck.sh \
&& chmod +x /healthcheck.sh
# Expose sidecar HTTP port and web UI port
EXPOSE 8080 3001
# Run claudebox-sidecar by default (HTTP server mode)
CMD ["claudebox-sidecar"]