- Backend: SSH execution via spawn() with -T flag for JSON streaming - Backend: PATH setup for non-login shells on remote hosts - Backend: History loading via SSH (tail -n 2000 for large files) - Frontend: Host selector UI with colored buttons in Sidebar - Frontend: Auto-select first project when host changes - Frontend: Pass host parameter to history and session APIs - Docker: Install openssh-client, mount SSH keys Enables running Claude sessions on remote hosts via SSH while viewing them through the web UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
913 B
Docker
41 lines
913 B
Docker
FROM node:20-slim
|
|
|
|
# Install SSH client for remote execution
|
|
RUN apt-get update && apt-get install -y openssh-client && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Create node user home structure for claude and ssh
|
|
RUN mkdir -p /home/node/.local/bin && \
|
|
mkdir -p /home/node/.local/share/claude && \
|
|
mkdir -p /home/node/.claude && \
|
|
mkdir -p /home/node/.config/claude && \
|
|
mkdir -p /home/node/.ssh && \
|
|
chown -R node:node /home/node
|
|
|
|
# Create symlink for claude binary
|
|
RUN ln -s /home/node/.local/share/claude/versions/2.0.67 /home/node/.local/bin/claude
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install --production
|
|
|
|
# Copy app source
|
|
COPY . .
|
|
|
|
# Set ownership
|
|
RUN chown -R node:node /app
|
|
|
|
# Switch to node user
|
|
USER node
|
|
|
|
# Set PATH to include claude
|
|
ENV PATH="/home/node/.local/bin:${PATH}"
|
|
|
|
EXPOSE 3001
|
|
|
|
CMD ["node", "server.js"]
|