- Add proper shutdown handling for MCP servers - Listen for stdin EOF (main issue causing 6min delays) - Add transport.close() to properly close connections - Add 5-minute timeout safety net - Handle SIGHUP signal - Disable Bun caching to avoid timeout errors - Add Dockerfile.runner for pre-built container option - Create optimized workflow example without container layer
26 lines
596 B
Docker
26 lines
596 B
Docker
FROM node:18-slim
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
curl \
|
|
unzip \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Bun globally
|
|
RUN curl -fsSL https://bun.sh/install | bash && \
|
|
ln -s /root/.bun/bin/bun /usr/local/bin/bun
|
|
|
|
# Pre-install Claude Code and dependencies
|
|
WORKDIR /opt/claude-action
|
|
COPY package.json bun.lockb* ./
|
|
RUN bun install --frozen-lockfile
|
|
|
|
# Install claude-code globally
|
|
RUN bun add -g @anthropic-ai/claude-code@1.0.62
|
|
|
|
# Set up environment
|
|
ENV PATH="/root/.bun/bin:${PATH}"
|
|
|
|
WORKDIR /workspace |