Fixed multiple issues in docker/test-env: - Changed Node.js installation to use official NodeSource repo (fixes npm compatibility) - Made repository volume mounts writable (removed :ro flag) - Fixed agents copy path (removed incorrect /agents/ subdirectory) - Fixed critical agent paths (studio-coach in bonus/, removed agent-updater) - Added explicit log file creation to fix permission errors - Removed test-results volume mount (caused permission issues) Test results: Manual installation now shows 28/35 tests passing - All 38 agents install correctly - All critical agents verified - MCP tools accessible via npx - Minor: Claude Code verification script has false negative - Minor: MCP global npm installs fail (network issue, npx works)
70 lines
1.8 KiB
Docker
70 lines
1.8 KiB
Docker
# Dockerfile for Testing Claude Code Suite Installation
|
|
# Tests all 3 installation methods: Interactive, Master Prompt, and Manual
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
# Prevent interactive prompts during build
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV NODE_VERSION=20
|
|
ENV PYTHON_VERSION=3.11
|
|
|
|
# Install system prerequisites (excluding nodejs and npm)
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
wget \
|
|
git \
|
|
build-essential \
|
|
python3 \
|
|
python3-pip \
|
|
jq \
|
|
vim \
|
|
bash \
|
|
ca-certificates \
|
|
gnupg \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Node.js 20.x from official NodeSource repository
|
|
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 globally
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
# Create test user
|
|
RUN useradd -m -s /bin/bash testuser && \
|
|
usermod -aG sudo testuser
|
|
|
|
# Set up working directory
|
|
WORKDIR /home/testuser
|
|
RUN chown -R testuser:testuser /home/testuser
|
|
|
|
# Copy repository files
|
|
COPY --chown=testuser:testuser ../../ /home/testuser/claude-code-glm-suite/
|
|
|
|
# Switch to test user
|
|
USER testuser
|
|
|
|
# Set environment variables
|
|
ENV HOME=/home/testuser
|
|
ENV PATH="$HOME/.local/bin:$PATH"
|
|
|
|
# Create Claude directory structure
|
|
RUN mkdir -p ~/.claude/{agents,plugins,hooks,sessions,projects}
|
|
|
|
# Make repository scripts executable
|
|
RUN chmod +x /home/testuser/claude-code-glm-suite/interactive-install-claude.sh 2>/dev/null || true
|
|
RUN chmod +x /home/testuser/claude-code-glm-suite/verify-claude-setup.sh 2>/dev/null || true
|
|
|
|
# Copy test suite files
|
|
COPY --chown=testuser:testuser test-suite/ $HOME/test-suite/
|
|
|
|
# Make scripts executable
|
|
RUN chmod +x $HOME/test-suite/*.sh
|
|
|
|
# Set working directory for tests
|
|
WORKDIR /home/testuser/test-suite
|
|
|
|
# Default command
|
|
CMD ["/bin/bash"]
|