From 7ae2024c83ee910cd989c95eb3c95e1a8e7d8778 Mon Sep 17 00:00:00 2001 From: rob Date: Sun, 28 Dec 2025 14:46:06 -0400 Subject: [PATCH] Add Docker support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dockerfile with Python 3.12, git, and optional Qt6 for GUI - docker-compose.yml with services: cli, build, test-install, gui, shell 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Dockerfile | 67 ++++++++++++++++++++++++++++ docker-compose.yml | 107 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0db49cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,67 @@ +# CascadingDev Simplified - Git-native AI collaboration framework +# +# Build: docker build -t cascadingdev . +# Test: docker run -it --rm cascadingdev cdev --help + +FROM python:3.12-slim + +LABEL maintainer="rob" +LABEL description="CascadingDev - Git hooks and cascading rules framework" + +# Install system dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + # Qt6 dependencies for Ramble GUI (optional) + libgl1-mesa-glx \ + libegl1-mesa \ + libxkbcommon0 \ + libdbus-1-3 \ + libxcb-cursor0 \ + libxcb-icccm4 \ + libxcb-keysyms1 \ + libxcb-shape0 \ + libxcb-xinerama0 \ + libxcb-randr0 \ + libxcb-render-util0 \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Copy project files +COPY pyproject.toml VERSION README.md ./ +COPY src/ ./src/ +COPY assets/ ./assets/ +COPY tools/ ./tools/ +COPY docs/ ./docs/ + +# Install CascadingDev +RUN pip install --no-cache-dir -e . + +# Install PySide6 for Ramble GUI (optional, makes image larger) +RUN pip install --no-cache-dir PySide6 || true + +# Verify installation +RUN cdev --help + +# Default: show help +CMD ["cdev", "--help"] + +# ============================================================================== +# Usage Examples +# ============================================================================== +# Build: +# docker build -t cascadingdev . +# +# Show help: +# docker run -it --rm cascadingdev +# +# Build installer bundle: +# docker run -it --rm -v $(pwd)/output:/output cascadingdev \ +# bash -c "cdev build && cp -r install/* /output/" +# +# Install into a new project (headless): +# docker run -it --rm -v /path/to/project:/project cascadingdev \ +# python install/cascadingdev-*/setup_cascadingdev.py --target /project --no-ramble +# +# Interactive shell: +# docker run -it --rm cascadingdev bash diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0f6b0a0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,107 @@ +# CascadingDev Simplified - Docker Compose +# +# Quick Start: +# docker-compose build # Build the image +# docker-compose run --rm cli # Show help +# docker-compose run --rm build # Build installer bundle +# docker-compose run --rm shell # Interactive shell + +version: '3.8' + +services: + # ============================================================================ + # CLI (show help) + # ============================================================================ + cli: + build: + context: . + dockerfile: Dockerfile + image: cascadingdev:latest + command: ["cdev", "--help"] + + # ============================================================================ + # Build installer bundle + # ============================================================================ + build: + build: + context: . + dockerfile: Dockerfile + image: cascadingdev:latest + volumes: + - ./output:/output + command: ["bash", "-c", "cdev build && cp -r install/* /output/ && echo 'Installer bundle copied to ./output/'"] + + # ============================================================================ + # Test installation (creates project in /tmp) + # ============================================================================ + test-install: + build: + context: . + dockerfile: Dockerfile + image: cascadingdev:latest + command: > + bash -c " + cdev build && + python install/cascadingdev-*/setup_cascadingdev.py --target /tmp/test-project --no-ramble && + echo '=== Installation successful ===' && + ls -la /tmp/test-project/ && + echo '=== Pre-commit hook ===' && + cat /tmp/test-project/.git/hooks/pre-commit | head -30 + " + + # ============================================================================ + # GUI (requires X11 forwarding) + # ============================================================================ + gui: + build: + context: . + dockerfile: Dockerfile + image: cascadingdev:latest + environment: + - DISPLAY=${DISPLAY:-:0} + - QT_QPA_PLATFORM=xcb + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix:ro + - ./output:/output + command: > + bash -c " + cdev build && + python install/cascadingdev-*/setup_cascadingdev.py --target /output/test-project + " + network_mode: host + + # ============================================================================ + # Interactive Shell + # ============================================================================ + shell: + build: + context: . + dockerfile: Dockerfile + image: cascadingdev:latest + volumes: + - ./output:/output + command: ["/bin/bash"] + stdin_open: true + tty: true + +# ============================================================================== +# Usage Examples +# ============================================================================== +# +# Build image: +# docker-compose build +# +# Show CLI help: +# docker-compose run --rm cli +# +# Build installer bundle (outputs to ./output/): +# docker-compose run --rm build +# +# Test installation in container: +# docker-compose run --rm test-install +# +# Interactive shell: +# docker-compose run --rm shell +# +# GUI with Ramble (requires: xhost +local:docker): +# docker-compose run --rm gui