4c14966ae3
The Pi Agent dockerfile templates created ~/.tmux.conf with a literal \n because the RUN command used single-quoted echo. Tmux never parsed the malformed line, so mouse mode stayed off. Without tmux mouse mode, mouse-wheel events in xterm.js fell back to Up/Down arrow keys and cycled shell command history instead of scrolling the terminal buffer. - Use printf '%s\n' to write real newlines in .tmux.conf. - Apply the same fix to the ranger rc.conf where the same bug existed. - Update tool-images/pi-agent.dockerfile and both affected alembic migration dockerfile strings. Quality gates: npm run typecheck, npm run lint, npm test -- --run (87 passed), py_compile on changed migrations. Refs: openspec/changes/fix-tmux-mouse-config
53 lines
1.4 KiB
Docker
53 lines
1.4 KiB
Docker
# Pi Coding Agent - Terminal-based coding harness
|
|
FROM ubuntu:24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install base dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
wget \
|
|
git \
|
|
neovim \
|
|
ranger \
|
|
tmux \
|
|
htop \
|
|
tree \
|
|
jq \
|
|
ca-certificates \
|
|
python3 \
|
|
python3-pip \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Node.js (required for Pi)
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
&& apt-get install -y nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Pi Coding Agent globally
|
|
RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
|
|
|
# Create non-root user
|
|
RUN useradd -m -s /bin/bash user
|
|
WORKDIR /home/user
|
|
|
|
# Set up git
|
|
RUN git config --global init.defaultBranch main \
|
|
&& git config --global user.email "dev@headquarter.local" \
|
|
&& git config --global user.name "Developer"
|
|
|
|
# Create default tmux config
|
|
RUN printf '%s\n' 'set -g mouse on' 'set -g default-terminal "screen-256color"' > /home/user/.tmux.conf
|
|
|
|
# Create default ranger config
|
|
RUN mkdir -p /home/user/.config/ranger \
|
|
&& printf '%s\n' 'set preview_files true' 'set use_preview_script true' > /home/user/.config/ranger/rc.conf
|
|
|
|
# Set up Pi config directory
|
|
RUN mkdir -p /home/user/.pi/agent
|
|
|
|
USER user
|
|
|
|
# Default to bash (Pi is invoked manually via `pi` command)
|
|
CMD ["/bin/bash"] |