Skip to content

Commit bd1e479

Browse files
committed
Fix CI builds on Ubuntu resolute base, pin all tool versions
- fx/php: drop the dead ondrej PPA, install native php8.5 packages (php8.5-imap no longer exists) - opencode: pinned install, binary owned by coder, verified at build time - fix unparenthesized '|| true' that silently masked build failures - pin every tool with an ENV *_VERSION variable - add AGENTS.md with repo conventions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S9abShYK5RMmbeuZurGH3b
1 parent aa72ac3 commit bd1e479

7 files changed

Lines changed: 123 additions & 62 deletions

File tree

‎AGENTS.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AGENTS.md
2+
3+
Coder Docker images (fx, php, nodejs, golang, python).
4+
5+
## Writing style
6+
7+
- Write in ASD-STE100 (Simplified Technical English).
8+
- Follow Zinsser's four principles of quality writing:
9+
1. Simplicity
10+
2. Brevity
11+
3. Clarity
12+
4. Humanity
13+
14+
## Conventions
15+
16+
- Pin every tool version with an `ENV *_VERSION` variable in each Dockerfile.
17+
- Keep Dockerfile comments very short and simple.
18+
- No unparenthesized `|| true` in RUN chains — it can silently skip the rest of the build.
19+
- Smoke tests live in the Makefile (`make test DOCKER_VARIANT=<variant>`).

‎CLAUDE.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CLAUDE.md
2+
3+
See [AGENTS.md](AGENTS.md).

‎fx/Dockerfile‎

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ ENV BUN_INSTALL=/usr/local
55
ENV NODE_VERSION=24
66
ENV GO_VERSION=1.26.5
77
ENV GLAB_VERSION=1.111.0
8+
ENV OPENCODE_VERSION=1.18.13
9+
ENV CLAUDE_VERSION=2.1.224
10+
ENV DENO_VERSION=2.9.4
11+
ENV BUN_VERSION=1.3.14
12+
ENV COMPOSER_VERSION=2.10.2
13+
ENV CODEX_VERSION=0.147.0
14+
ENV COPILOT_VERSION=1.0.78
15+
ENV PI_VERSION=0.84.1
16+
ENV T3_VERSION=0.0.31
17+
ENV PNPM_VERSION=11.20.0
18+
ENV AGENT_BROWSER_VERSION=0.33.2
819
ENV GOROOT=/usr/local/go
920
ENV GOPATH=/home/coder/go
1021
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
@@ -25,11 +36,9 @@ RUN \
2536
# REPOS ####################################################################
2637
# Add all package repos first, then do a single apt-get update
2738
apt-get update && \
28-
apt-get install -y --no-install-recommends curl wget software-properties-common gpg && \
39+
apt-get install -y --no-install-recommends curl wget gpg && \
2940
# Node repo
3041
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - && \
31-
# PHP repo
32-
add-apt-repository -y ppa:ondrej/php && \
3342
# GitHub CLI repo
3443
wget -qO /tmp/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg && \
3544
mkdir -p -m 755 /etc/apt/keyrings && \
@@ -44,7 +53,7 @@ RUN \
4453
# Node
4554
nodejs \
4655
# PHP
47-
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-imap php8.5-intl \
56+
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-intl \
4857
php8.5-mailparse php8.5-mbstring php8.5-mysql php8.5-pgsql php8.5-phpdbg \
4958
php8.5-readline php8.5-redis php8.5-soap php8.5-sqlite3 php8.5-xml \
5059
php8.5-zip php8.5-bcmath php8.5-apcu php8.5-imagick \
@@ -71,36 +80,37 @@ RUN \
7180
rm /tmp/go.tar.gz && \
7281
mkdir -p /home/coder/go && \
7382
# COMPOSER ##################################################################
74-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
83+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} && \
7584
# GLAB (GitLab CLI) ########################################################
7685
curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_$(dpkg --print-architecture).deb" -o /tmp/glab.deb && \
7786
dpkg -i /tmp/glab.deb && \
7887
rm -f /tmp/glab.deb && \
7988
# DENO ######################################################################
80-
curl -fsSL https://deno.land/install.sh | sh && \
89+
curl -fsSL https://deno.land/install.sh | sh -s v${DENO_VERSION} && \
8190
# BUN #######################################################################
82-
curl -fsSL https://bun.sh/install | bash && \
91+
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" && \
8392
# CLAUDE ####################################################################
8493
# Install into /usr/local/bin (image layer) so the binary survives the
8594
# persistent /home/coder volume that Coder mounts over the home dir at runtime.
86-
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
95+
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
8796
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /usr/local/bin/claude; fi && \
8897
if [ -f /root/bin/claude ]; then cp /root/bin/claude /usr/local/bin/claude; fi && \
8998
chmod 0755 /usr/local/bin/claude && \
9099
# OPENCODE ##################################################################
91-
(curl -fsSL https://opencode.ai/install | bash || true) && \
92-
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /usr/local/bin/opencode; fi && \
100+
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
101+
cp /root/.opencode/bin/opencode /usr/local/bin/opencode && \
93102
chmod 0755 /usr/local/bin/opencode && \
103+
opencode --version && \
94104
# NPM: CODEX, COPILOT #######################################################
95-
npm install -g @openai/codex @github/copilot && \
105+
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
96106
# PI ########################################################################
97-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
107+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
98108
# T3CODE (browser GUI for coding agents) ###################################
99-
npm install -g t3 && \
109+
npm install -g t3@${T3_VERSION} && \
100110
# PNPM ######################################################################
101-
npm install -g pnpm && \
111+
npm install -g pnpm@${PNPM_VERSION} && \
102112
# AGENT-BROWSER ##############################################################
103-
npm install -g agent-browser && \
113+
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
104114
runuser -u coder -- agent-browser install && \
105115
# PROFILE (DENO, BUN PATH) ##################################################
106116
echo '' >> /etc/profile && \
@@ -119,12 +129,12 @@ RUN \
119129
echo 'export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"' >> /etc/profile && \
120130
echo 'export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"' >> /etc/profile && \
121131
# OWNERSHIP (coder can upgrade tools) ######################################
122-
chown coder:coder /usr/local/bin/claude /usr/local/bin/opencode 2>/dev/null || true && \
123-
chown -R coder:coder /home/coder/go 2>/dev/null || true && \
132+
chown coder:coder /usr/local/bin/claude /usr/local/bin/opencode && \
133+
chown -R coder:coder /home/coder/go && \
124134
# CLEANUP ###################################################################
125135
apt-get clean -y && \
126136
apt-get autoclean -y && \
127-
apt-get remove -y wget software-properties-common && \
137+
apt-get remove -y wget && \
128138
apt-get autoremove -y && \
129139
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/* \
130140
/root/.npm /root/.cache /root/.local /root/.opencode /root/.bun

‎golang/Dockerfile‎

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ FROM codercom/enterprise-base:ubuntu
33
ENV NODE_VERSION=24
44
ENV GO_VERSION=1.26.5
55
ENV GLAB_VERSION=1.111.0
6+
ENV OPENCODE_VERSION=1.18.13
7+
ENV CLAUDE_VERSION=2.1.224
8+
ENV CODEX_VERSION=0.147.0
9+
ENV COPILOT_VERSION=1.0.78
10+
ENV PI_VERSION=0.84.1
11+
ENV AGENT_BROWSER_VERSION=0.33.2
612
ENV GOROOT=/usr/local/go
713
ENV GOPATH=/home/coder/go
814
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
@@ -43,24 +49,25 @@ RUN \
4349
rm /tmp/go.tar.gz && \
4450
mkdir -p /home/coder/go && \
4551
# CLAUDE ####################################################################
46-
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
52+
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
4753
mkdir -p /home/coder/.local/bin && \
4854
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /home/coder/.local/bin/claude; fi && \
4955
if [ -f /root/bin/claude ]; then cp /root/bin/claude /home/coder/.local/bin/claude; fi && \
50-
chmod +x /home/coder/.local/bin/claude 2>/dev/null || true && \
56+
(chmod +x /home/coder/.local/bin/claude 2>/dev/null || true) && \
5157
ln -sf /home/coder/.local/bin/claude /usr/local/bin/claude && \
5258
# OPENCODE ##################################################################
53-
(curl -fsSL https://opencode.ai/install | bash || true) && \
59+
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
5460
mkdir -p /home/coder/.opencode/bin && \
55-
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode; fi && \
56-
chmod +x /home/coder/.opencode/bin/opencode 2>/dev/null || true && \
61+
cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode && \
62+
chmod 0755 /home/coder/.opencode/bin/opencode && \
5763
ln -sf /home/coder/.opencode/bin/opencode /usr/local/bin/opencode && \
64+
opencode --version && \
5865
# NPM: CODEX, COPILOT #######################################################
59-
npm install -g @openai/codex @github/copilot && \
66+
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
6067
# PI ########################################################################
61-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
68+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
6269
# AGENT-BROWSER ##############################################################
63-
npm install -g agent-browser && \
70+
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
6471
runuser -u coder -- agent-browser install && \
6572
# PROFILE ##################################################################
6673
echo '' >> /etc/profile && \
@@ -69,7 +76,7 @@ RUN \
6976
echo 'export GOPATH="$HOME/go"' >> /etc/profile && \
7077
echo 'export PATH="$GOROOT/bin:$GOPATH/bin:$PATH"' >> /etc/profile && \
7178
# OWNERSHIP ################################################################
72-
chown -R coder:coder /home/coder/.local /home/coder/.opencode /home/coder/go 2>/dev/null || true && \
79+
chown -R coder:coder /home/coder/.local /home/coder/.opencode /home/coder/go && \
7380
# CLEANUP ###################################################################
7481
apt-get clean -y && \
7582
apt-get autoclean -y && \

‎nodejs/Dockerfile‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ ENV DENO_INSTALL=/usr/local
44
ENV BUN_INSTALL=/usr/local
55
ENV NODE_VERSION=24
66
ENV GLAB_VERSION=1.111.0
7+
ENV OPENCODE_VERSION=1.18.13
8+
ENV CLAUDE_VERSION=2.1.224
9+
ENV DENO_VERSION=2.9.4
10+
ENV BUN_VERSION=1.3.14
11+
ENV CODEX_VERSION=0.147.0
12+
ENV COPILOT_VERSION=1.0.78
13+
ENV PI_VERSION=0.84.1
14+
ENV AGENT_BROWSER_VERSION=0.33.2
715

816
USER root
917

@@ -35,28 +43,29 @@ RUN \
3543
dpkg -i /tmp/glab.deb && \
3644
rm -f /tmp/glab.deb && \
3745
# DENO ######################################################################
38-
curl -fsSL https://deno.land/install.sh | sh && \
46+
curl -fsSL https://deno.land/install.sh | sh -s v${DENO_VERSION} && \
3947
# BUN #######################################################################
40-
curl -fsSL https://bun.sh/install | bash && \
48+
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" && \
4149
# CLAUDE ####################################################################
42-
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
50+
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
4351
mkdir -p /home/coder/.local/bin && \
4452
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /home/coder/.local/bin/claude; fi && \
4553
if [ -f /root/bin/claude ]; then cp /root/bin/claude /home/coder/.local/bin/claude; fi && \
46-
chmod +x /home/coder/.local/bin/claude 2>/dev/null || true && \
54+
(chmod +x /home/coder/.local/bin/claude 2>/dev/null || true) && \
4755
ln -sf /home/coder/.local/bin/claude /usr/local/bin/claude && \
4856
# OPENCODE ##################################################################
49-
(curl -fsSL https://opencode.ai/install | bash || true) && \
57+
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
5058
mkdir -p /home/coder/.opencode/bin && \
51-
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode; fi && \
52-
chmod +x /home/coder/.opencode/bin/opencode 2>/dev/null || true && \
59+
cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode && \
60+
chmod 0755 /home/coder/.opencode/bin/opencode && \
5361
ln -sf /home/coder/.opencode/bin/opencode /usr/local/bin/opencode && \
62+
opencode --version && \
5463
# NPM: CODEX, COPILOT #######################################################
55-
npm install -g @openai/codex @github/copilot && \
64+
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
5665
# PI ########################################################################
57-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
66+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
5867
# AGENT-BROWSER ##############################################################
59-
npm install -g agent-browser && \
68+
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
6069
runuser -u coder -- agent-browser install && \
6170
# PROFILE ##################################################################
6271
echo '' >> /etc/profile && \
@@ -66,7 +75,7 @@ RUN \
6675
echo '[ -d "$DENO_INSTALL/bin" ] && export PATH="$DENO_INSTALL/bin:$PATH"' >> /etc/profile && \
6776
echo '[ -d "$BUN_INSTALL/bin" ] && export PATH="$BUN_INSTALL/bin:$PATH"' >> /etc/profile && \
6877
# OWNERSHIP ################################################################
69-
chown -R coder:coder /home/coder/.local /home/coder/.opencode 2>/dev/null || true && \
78+
chown -R coder:coder /home/coder/.local /home/coder/.opencode && \
7079
# CLEANUP ###################################################################
7180
apt-get clean -y && \
7281
apt-get autoclean -y && \

‎php/Dockerfile‎

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@ FROM codercom/enterprise-base:ubuntu
22

33
ENV NODE_VERSION=24
44
ENV GLAB_VERSION=1.111.0
5+
ENV OPENCODE_VERSION=1.18.13
6+
ENV CLAUDE_VERSION=2.1.224
7+
ENV COMPOSER_VERSION=2.10.2
8+
ENV CODEX_VERSION=0.147.0
9+
ENV COPILOT_VERSION=1.0.78
10+
ENV PI_VERSION=0.84.1
11+
ENV AGENT_BROWSER_VERSION=0.33.2
512

613
USER root
714

815
RUN \
916
# REPOS ####################################################################
1017
apt-get update && \
11-
apt-get install -y --no-install-recommends curl wget software-properties-common gpg && \
18+
apt-get install -y --no-install-recommends curl wget gpg && \
1219
# Node repo (needed for npm tools)
1320
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - && \
14-
# PHP repo
15-
add-apt-repository -y ppa:ondrej/php && \
1621
# GitHub CLI repo
1722
wget -qO /tmp/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg && \
1823
mkdir -p -m 755 /etc/apt/keyrings && \
@@ -25,7 +30,7 @@ RUN \
2530
apt-get install -y --no-install-recommends \
2631
git jq ripgrep tmux nodejs \
2732
# PHP
28-
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-imap php8.5-intl \
33+
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-intl \
2934
php8.5-mailparse php8.5-mbstring php8.5-mysql php8.5-pgsql php8.5-phpdbg \
3035
php8.5-readline php8.5-redis php8.5-soap php8.5-sqlite3 php8.5-xml \
3136
php8.5-zip php8.5-bcmath php8.5-apcu php8.5-imagick \
@@ -42,37 +47,38 @@ RUN \
4247
libatk1.0-0 libxrender1 libfontconfig1 libdbus-1-3 libxcb1 libxext6 libx11-6 && \
4348
echo 'variables_order = "EGPCS"' > /etc/php/8.5/cli/conf.d/99-coder.ini && \
4449
# COMPOSER ##################################################################
45-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
50+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} && \
4651
# GLAB (GitLab CLI) ########################################################
4752
curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_$(dpkg --print-architecture).deb" -o /tmp/glab.deb && \
4853
dpkg -i /tmp/glab.deb && \
4954
rm -f /tmp/glab.deb && \
5055
# CLAUDE ####################################################################
51-
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
56+
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
5257
mkdir -p /home/coder/.local/bin && \
5358
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /home/coder/.local/bin/claude; fi && \
5459
if [ -f /root/bin/claude ]; then cp /root/bin/claude /home/coder/.local/bin/claude; fi && \
55-
chmod +x /home/coder/.local/bin/claude 2>/dev/null || true && \
60+
(chmod +x /home/coder/.local/bin/claude 2>/dev/null || true) && \
5661
ln -sf /home/coder/.local/bin/claude /usr/local/bin/claude && \
5762
# OPENCODE ##################################################################
58-
(curl -fsSL https://opencode.ai/install | bash || true) && \
63+
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
5964
mkdir -p /home/coder/.opencode/bin && \
60-
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode; fi && \
61-
chmod +x /home/coder/.opencode/bin/opencode 2>/dev/null || true && \
65+
cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode && \
66+
chmod 0755 /home/coder/.opencode/bin/opencode && \
6267
ln -sf /home/coder/.opencode/bin/opencode /usr/local/bin/opencode && \
68+
opencode --version && \
6369
# NPM: CODEX, COPILOT #######################################################
64-
npm install -g @openai/codex @github/copilot && \
70+
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
6571
# PI ########################################################################
66-
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
72+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
6773
# AGENT-BROWSER ##############################################################
68-
npm install -g agent-browser && \
74+
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
6975
runuser -u coder -- agent-browser install && \
7076
# OWNERSHIP ################################################################
71-
chown -R coder:coder /home/coder/.local /home/coder/.opencode 2>/dev/null || true && \
77+
chown -R coder:coder /home/coder/.local /home/coder/.opencode && \
7278
# CLEANUP ###################################################################
7379
apt-get clean -y && \
7480
apt-get autoclean -y && \
75-
apt-get remove -y wget software-properties-common && \
81+
apt-get remove -y wget && \
7682
apt-get autoremove -y && \
7783
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/* \
7884
/root/.npm /root/.cache /root/.local /root/.opencode

0 commit comments

Comments
 (0)