diff --git a/Dockerfile b/Dockerfile index 162d8c5..e75efc2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,20 @@ -# Development Hub Ecosystem - Docker Build for Testing +# Development Hub Ecosystem - Docker Build # -# Tests that all ecosystem projects can be installed together. -# GUI functionality is not tested (no X11), only imports and CLI tools. +# Run the full GUI from Docker with X11 forwarding. # # Build: docker build -t development-hub . -# Test: docker run --rm development-hub +# Run GUI: docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix development-hub +# Test: docker run --rm development-hub /test.sh FROM python:3.12-slim -# Install system dependencies for Qt (even though we won't run GUI, imports need libs) +# Install system dependencies for Qt GUI RUN apt-get update && apt-get install -y --no-install-recommends \ git \ libgl1 \ libegl1 \ libxkbcommon0 \ + libxkbcommon-x11-0 \ libdbus-1-3 \ libxcb-cursor0 \ libxcb-icccm4 \ @@ -24,12 +25,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxcb-render0 \ libxcb-render-util0 \ libxcb-image0 \ + libxcb-xkb1 \ libglib2.0-0 \ + libfontconfig1 \ + libfreetype6 \ && rm -rf /var/lib/apt/lists/* -# Set up virtual display for Qt imports (no actual display, just for import) -ENV QT_QPA_PLATFORM=offscreen - WORKDIR /workspace # Clone all repos @@ -72,4 +73,5 @@ echo ""\n\ echo "All tests passed!"\n\ ' > /test.sh && chmod +x /test.sh -CMD ["/test.sh"] +# Default: run the GUI (use /test.sh for testing) +CMD ["development-hub"] diff --git a/docker-compose.yml b/docker-compose.yml index 04d23bc..3b43bcb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,23 +1,27 @@ # Development Ecosystem Docker Compose # -# Builds and tests the complete ecosystem installation. -# # Usage: -# docker compose build # Build the test image -# docker compose up # Run installation tests -# docker compose down # Cleanup +# docker compose build # Build the image +# docker compose up gui # Run the GUI (requires X11) +# docker compose up test # Run installation tests +# +# Before running GUI, allow Docker access to X11: +# xhost +local:docker services: - ecosystem-test: + gui: + build: . + container_name: development-hub-gui + environment: + - DISPLAY=${DISPLAY} + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + - ~/.config:/root/.config # Persist settings + network_mode: host # Needed for some X11 setups + + test: build: . container_name: development-hub-test environment: - QT_QPA_PLATFORM=offscreen - - DISPLAY=:99 - # For local development testing, mount the local repos: - # volumes: - # - ./:/workspace/development-hub:ro - # - ../CmdForge:/workspace/CmdForge:ro - # - ../ramble:/workspace/ramble:ro - # - ../artifact-editor:/workspace/artifact-editor:ro - # - ../orchestrated-discussions:/workspace/orchestrated-discussions:ro + command: /test.sh