Add X11 forwarding support to Docker
Users can now run the full GUI from Docker: xhost +local:docker docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix development-hub Or with docker-compose: docker compose up gui 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
39a85b6748
commit
fbc20b3f7d
20
Dockerfile
20
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.
|
# Run the full GUI from Docker with X11 forwarding.
|
||||||
# GUI functionality is not tested (no X11), only imports and CLI tools.
|
|
||||||
#
|
#
|
||||||
# Build: docker build -t development-hub .
|
# 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
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
libgl1 \
|
libgl1 \
|
||||||
libegl1 \
|
libegl1 \
|
||||||
libxkbcommon0 \
|
libxkbcommon0 \
|
||||||
|
libxkbcommon-x11-0 \
|
||||||
libdbus-1-3 \
|
libdbus-1-3 \
|
||||||
libxcb-cursor0 \
|
libxcb-cursor0 \
|
||||||
libxcb-icccm4 \
|
libxcb-icccm4 \
|
||||||
|
|
@ -24,12 +25,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
libxcb-render0 \
|
libxcb-render0 \
|
||||||
libxcb-render-util0 \
|
libxcb-render-util0 \
|
||||||
libxcb-image0 \
|
libxcb-image0 \
|
||||||
|
libxcb-xkb1 \
|
||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
|
libfontconfig1 \
|
||||||
|
libfreetype6 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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
|
WORKDIR /workspace
|
||||||
|
|
||||||
# Clone all repos
|
# Clone all repos
|
||||||
|
|
@ -72,4 +73,5 @@ echo ""\n\
|
||||||
echo "All tests passed!"\n\
|
echo "All tests passed!"\n\
|
||||||
' > /test.sh && chmod +x /test.sh
|
' > /test.sh && chmod +x /test.sh
|
||||||
|
|
||||||
CMD ["/test.sh"]
|
# Default: run the GUI (use /test.sh for testing)
|
||||||
|
CMD ["development-hub"]
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,27 @@
|
||||||
# Development Ecosystem Docker Compose
|
# Development Ecosystem Docker Compose
|
||||||
#
|
#
|
||||||
# Builds and tests the complete ecosystem installation.
|
|
||||||
#
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# docker compose build # Build the test image
|
# docker compose build # Build the image
|
||||||
# docker compose up # Run installation tests
|
# docker compose up gui # Run the GUI (requires X11)
|
||||||
# docker compose down # Cleanup
|
# docker compose up test # Run installation tests
|
||||||
|
#
|
||||||
|
# Before running GUI, allow Docker access to X11:
|
||||||
|
# xhost +local:docker
|
||||||
|
|
||||||
services:
|
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: .
|
build: .
|
||||||
container_name: development-hub-test
|
container_name: development-hub-test
|
||||||
environment:
|
environment:
|
||||||
- QT_QPA_PLATFORM=offscreen
|
- QT_QPA_PLATFORM=offscreen
|
||||||
- DISPLAY=:99
|
command: /test.sh
|
||||||
# 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
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue