Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/dockerfiles/Dockerfile.claude
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM ubuntu:22.04

# Install curl and git, update package list
RUN apt-get update && apt-get install -y curl git ripgrep
RUN apt-get update && apt-get install -y curl git ripgrep procps

# Install Node.js 24.x
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash - && apt-get install -y nodejs
Expand Down
24 changes: 22 additions & 2 deletions packages/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,27 @@ FROM oven/bun:1
# Install system dependencies including build tools for native modules
RUN apt-get update && apt-get install -y \
bash \
bc \
curl \
wget \
git \
python3 \
python3-pip \
build-essential \
procps \
neovim \
jq \
tini \
&& rm -rf /var/lib/apt/lists/*

# Install Node.js for MCP server support
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs

# Set up Bun environment
ENV BUN_INSTALL="/home/.bun"
ENV PATH="$BUN_INSTALL/bin:$PATH"
ENV EDITOR="nvim"

# Install coding agents globally
RUN bun add -g @anthropic-ai/claude-code@latest || echo "Claude CLI install failed"
Expand All @@ -26,16 +36,26 @@ RUN bun add -g @vibe-kit/grok-cli@latest || echo "Grok CLI install failed"
RUN curl -sSL https://install.anthropic.com | bash || echo "Alternative Claude install failed"
ENV PATH="/root/.local/bin:$BUN_INSTALL/bin:$PATH"

# Install ccusage for Claude Code usage tracking
RUN npm install -g ccusage || echo "ccusage install failed (non-critical)"

# Install uv package manager for fetch MCP server
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"

# Install vibekit CLI globally and create symlink
RUN bun add -g vibekit || echo "Vibekit install failed"

# Create workspace directory
RUN mkdir -p /workspace
# Create workspace directory and Claude directories
RUN mkdir -p /workspace /root/.claude
WORKDIR /workspace

# Expose common local development ports
EXPOSE 3001
EXPOSE 8080

# Use tini as PID 1 to properly handle subprocesses and signals
ENTRYPOINT ["/usr/bin/tini", "--"]

# Keep container running for persistent use
CMD ["tail", "-f", "/dev/null"]
10 changes: 10 additions & 0 deletions packages/cli/src/agents/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,16 @@ class BaseAgent {
...options.env
};

// Ensure PATH includes system directories for commands like ps
if (!env.PATH || !env.PATH.includes('/usr/bin')) {
const systemPaths = ['/usr/local/bin', '/usr/bin', '/bin'];
const currentPath = env.PATH || '';
const missingPaths = systemPaths.filter(p => !currentPath.split(':').includes(p));
if (missingPaths.length > 0) {
env.PATH = currentPath ? `${currentPath}:${missingPaths.join(':')}` : systemPaths.join(':');
}
}

// Add proxy settings to environment if specified
if (this.proxy) {
env.HTTP_PROXY = this.proxy;
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/auth/claude-auth-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ export class ClaudeAuthHelper {
// Get valid OAuth token and raw token data
const token = await ClaudeAuth.getValidToken();
const tokenData = await ClaudeAuth.getRawToken();

if (!token || !tokenData) {
return null;
}

// Generate settings for onboarding bypass (now includes MCP servers from host)
const settings = await this.generateClaudeSettings(tokenData);

return {
oauthToken: token,
settings: settings,
tokenData: tokenData
};

} catch (error) {
// Return null if auth fails - this is expected when not authenticated
return null;
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/sandbox/docker-sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ export class DockerSandbox {
const customFlags = SandboxConfig.getSandboxFlags();
containerArgs.push(...customFlags);

// Mark container as sandbox environment (for hooks and scripts)
containerArgs.push('-e', 'VIBEKIT_SANDBOX_ACTIVE=1');

// Mount project directory
containerArgs.push('-v', `${this.projectRoot}:/workspace`);

Expand Down
Loading