Fix Docker test infrastructure
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)
This commit is contained in:
@@ -8,7 +8,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV NODE_VERSION=20
|
||||
ENV PYTHON_VERSION=3.11
|
||||
|
||||
# Install system prerequisites
|
||||
# Install system prerequisites (excluding nodejs and npm)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
wget \
|
||||
@@ -16,17 +16,17 @@ RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
python3 \
|
||||
python3-pip \
|
||||
nodejs \
|
||||
npm \
|
||||
jq \
|
||||
vim \
|
||||
bash \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Upgrade Node.js to version 20
|
||||
RUN npm install -g n && \
|
||||
n $NODE_VERSION && \
|
||||
npm install -g npm@latest
|
||||
# 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
|
||||
@@ -39,6 +39,9 @@ RUN useradd -m -s /bin/bash testuser && \
|
||||
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
|
||||
|
||||
@@ -49,6 +52,10 @@ 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/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user