development-hub/Dockerfile

79 lines
2.5 KiB
Docker

# Development Hub Ecosystem - Docker Build
#
# Run the full GUI from Docker with X11 forwarding.
#
# Build: docker build -t 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 GUI
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
procps \
libgl1 \
libegl1 \
libxkbcommon0 \
libxkbcommon-x11-0 \
libdbus-1-3 \
libxcb-cursor0 \
libxcb-icccm4 \
libxcb-keysyms1 \
libxcb-shape0 \
libxcb-xfixes0 \
libxcb-xinerama0 \
libxcb-render0 \
libxcb-render-util0 \
libxcb-image0 \
libxcb-xkb1 \
libglib2.0-0 \
libfontconfig1 \
libfreetype6 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Clone all repos
ARG GITEA_URL=https://gitea.brrd.tech/rob
RUN git clone ${GITEA_URL}/CmdForge.git CmdForge && \
git clone ${GITEA_URL}/ramble.git ramble && \
git clone ${GITEA_URL}/artifact-editor.git artifact-editor && \
git clone ${GITEA_URL}/orchestrated-discussions.git orchestrated-discussions && \
git clone ${GITEA_URL}/development-hub.git development-hub
# Create venv and install
RUN python -m venv /venv
ENV PATH="/venv/bin:$PATH"
RUN pip install --upgrade pip wheel setuptools
# Install in dependency order (all patches applied above)
RUN pip install -e /workspace/CmdForge
RUN pip install -e /workspace/ramble
RUN pip install -e /workspace/artifact-editor
RUN pip install -e "/workspace/orchestrated-discussions[gui]"
RUN pip install -e /workspace/development-hub
# Verification script
RUN echo '#!/bin/bash\n\
set -e\n\
echo "Testing imports..."\n\
python -c "import cmdforge; print(\" cmdforge: OK\")"\n\
python -c "import ramble; print(\" ramble: OK\")"\n\
python -c "import artifact_editor; print(\" artifact_editor: OK\")"\n\
python -c "import discussions; print(\" discussions: OK\")"\n\
python -c "import development_hub; print(\" development_hub: OK\")"\n\
echo ""\n\
echo "Testing CLI tools..."\n\
cmdforge --help > /dev/null && echo " cmdforge CLI: OK"\n\
ramble --help > /dev/null && echo " ramble CLI: OK"\n\
artifact-editor --help > /dev/null && echo " artifact-editor CLI: OK"\n\
discussions --help > /dev/null && echo " discussions CLI: OK"\n\
echo ""\n\
echo "All tests passed!"\n\
' > /test.sh && chmod +x /test.sh
# Default: run the GUI (use /test.sh for testing)
CMD ["development-hub"]