Skip to content

Commit 4f745f3

Browse files
authored
Merge pull request #2 from dtump/fix/iterm-control-keys
Fix iTerm control keys in tmux mode
2 parents 5c4c246 + f9ac1cf commit 4f745f3

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

Dockerfile

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6565
"nodejs=${NODE_VERSION}" \
6666
git \
6767
git-lfs \
68-
tmux \
6968
ncurses-term \
7069
jq \
7170
less \
@@ -74,6 +73,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
7473
&& git lfs install --system --skip-repo \
7574
&& rm -rf /var/lib/apt/lists/*
7675

76+
# iTerm2 control mode sends Ctrl-P/Ctrl-X to tmux as hexadecimal key names
77+
# (for example, `0x10`). tmux 3.5 removed support for that representation,
78+
# causing those names to be inserted into the pane literally. Build the last
79+
# compatible release instead of using Ubuntu 26.04's newer tmux package.
80+
# The release tarball and checksum are pinned so this source build remains
81+
# reproducible. Runtime dependencies are already installed by the base image.
82+
ARG TMUX_VERSION=3.4
83+
ARG TMUX_SHA256=551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa
84+
RUN apt-get update && apt-get install -y --no-install-recommends \
85+
bison \
86+
build-essential \
87+
libevent-dev \
88+
libncurses-dev \
89+
pkg-config \
90+
&& curl -fsSL "https://github.com/tmux/tmux/releases/download/${TMUX_VERSION}/tmux-${TMUX_VERSION}.tar.gz" -o /tmp/tmux.tar.gz \
91+
&& echo "${TMUX_SHA256} /tmp/tmux.tar.gz" | sha256sum -c - \
92+
&& tar -xzf /tmp/tmux.tar.gz -C /tmp \
93+
&& cd "/tmp/tmux-${TMUX_VERSION}" \
94+
&& ./configure \
95+
&& make -j"$(nproc)" \
96+
&& make install \
97+
&& cd / \
98+
&& rm -rf "/tmp/tmux-${TMUX_VERSION}" /tmp/tmux.tar.gz \
99+
&& apt-get purge -y \
100+
bison \
101+
build-essential \
102+
libevent-dev \
103+
libncurses-dev \
104+
pkg-config \
105+
&& rm -rf /var/lib/apt/lists/*
106+
77107
# GitHub CLI (keyring fetched at build; TODO: commit the keyring to the repo)
78108
RUN install -d -m 0755 /etc/apt/keyrings \
79109
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \

0 commit comments

Comments
 (0)