Skip to content
Open
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
10 changes: 10 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CLAUDE.md

Coder Docker images (fx, php, nodejs, golang, python).

## Conventions

- Pin every tool version with an `ENV *_VERSION` variable in each Dockerfile.
- Keep Dockerfile comments very short and simple.
- No unparenthesized `|| true` in RUN chains — it can silently skip the rest of the build.
- Smoke tests live in the Makefile (`make test DOCKER_VARIANT=<variant>`).
46 changes: 28 additions & 18 deletions fx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ ENV BUN_INSTALL=/usr/local
ENV NODE_VERSION=24
ENV GO_VERSION=1.26.5
ENV GLAB_VERSION=1.111.0
ENV OPENCODE_VERSION=1.18.13
ENV CLAUDE_VERSION=2.1.224
ENV DENO_VERSION=2.9.4
ENV BUN_VERSION=1.3.14
ENV COMPOSER_VERSION=2.10.2
ENV CODEX_VERSION=0.147.0
ENV COPILOT_VERSION=1.0.78
ENV PI_VERSION=0.84.1
ENV T3_VERSION=0.0.31
ENV PNPM_VERSION=11.20.0
ENV AGENT_BROWSER_VERSION=0.33.2
ENV GOROOT=/usr/local/go
ENV GOPATH=/home/coder/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
Expand All @@ -25,11 +36,9 @@ RUN \
# REPOS ####################################################################
# Add all package repos first, then do a single apt-get update
apt-get update && \
apt-get install -y --no-install-recommends curl wget software-properties-common gpg && \
apt-get install -y --no-install-recommends curl wget gpg && \
# Node repo
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - && \
# PHP repo
add-apt-repository -y ppa:ondrej/php && \
# GitHub CLI repo
wget -qO /tmp/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg && \
mkdir -p -m 755 /etc/apt/keyrings && \
Expand All @@ -44,7 +53,7 @@ RUN \
# Node
nodejs \
# PHP
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-imap php8.5-intl \
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-intl \
php8.5-mailparse php8.5-mbstring php8.5-mysql php8.5-pgsql php8.5-phpdbg \
php8.5-readline php8.5-redis php8.5-soap php8.5-sqlite3 php8.5-xml \
php8.5-zip php8.5-bcmath php8.5-apcu php8.5-imagick \
Expand All @@ -71,36 +80,37 @@ RUN \
rm /tmp/go.tar.gz && \
mkdir -p /home/coder/go && \
# COMPOSER ##################################################################
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} && \
# GLAB (GitLab CLI) ########################################################
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 && \
dpkg -i /tmp/glab.deb && \
rm -f /tmp/glab.deb && \
# DENO ######################################################################
curl -fsSL https://deno.land/install.sh | sh && \
curl -fsSL https://deno.land/install.sh | sh -s v${DENO_VERSION} && \
# BUN #######################################################################
curl -fsSL https://bun.sh/install | bash && \
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" && \
# CLAUDE ####################################################################
# Install into /usr/local/bin (image layer) so the binary survives the
# persistent /home/coder volume that Coder mounts over the home dir at runtime.
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /usr/local/bin/claude; fi && \
if [ -f /root/bin/claude ]; then cp /root/bin/claude /usr/local/bin/claude; fi && \
chmod 0755 /usr/local/bin/claude && \
# OPENCODE ##################################################################
(curl -fsSL https://opencode.ai/install | bash || true) && \
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /usr/local/bin/opencode; fi && \
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
cp /root/.opencode/bin/opencode /usr/local/bin/opencode && \
chmod 0755 /usr/local/bin/opencode && \
opencode --version && \
# NPM: CODEX, COPILOT #######################################################
npm install -g @openai/codex @github/copilot && \
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
# PI ########################################################################
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
# T3CODE (browser GUI for coding agents) ###################################
npm install -g t3 && \
npm install -g t3@${T3_VERSION} && \
# PNPM ######################################################################
npm install -g pnpm && \
npm install -g pnpm@${PNPM_VERSION} && \
# AGENT-BROWSER ##############################################################
npm install -g agent-browser && \
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
runuser -u coder -- agent-browser install && \
# PROFILE (DENO, BUN PATH) ##################################################
echo '' >> /etc/profile && \
Expand All @@ -119,12 +129,12 @@ RUN \
echo 'export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"' >> /etc/profile && \
echo 'export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"' >> /etc/profile && \
# OWNERSHIP (coder can upgrade tools) ######################################
chown coder:coder /usr/local/bin/claude /usr/local/bin/opencode 2>/dev/null || true && \
chown -R coder:coder /home/coder/go 2>/dev/null || true && \
chown coder:coder /usr/local/bin/claude /usr/local/bin/opencode && \
chown -R coder:coder /home/coder/go && \
# CLEANUP ###################################################################
apt-get clean -y && \
apt-get autoclean -y && \
apt-get remove -y wget software-properties-common && \
apt-get remove -y wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/* \
/root/.npm /root/.cache /root/.local /root/.opencode /root/.bun
Expand Down
25 changes: 16 additions & 9 deletions golang/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ FROM codercom/enterprise-base:ubuntu
ENV NODE_VERSION=24
ENV GO_VERSION=1.26.5
ENV GLAB_VERSION=1.111.0
ENV OPENCODE_VERSION=1.18.13
ENV CLAUDE_VERSION=2.1.224
ENV CODEX_VERSION=0.147.0
ENV COPILOT_VERSION=1.0.78
ENV PI_VERSION=0.84.1
ENV AGENT_BROWSER_VERSION=0.33.2
ENV GOROOT=/usr/local/go
ENV GOPATH=/home/coder/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
Expand Down Expand Up @@ -43,24 +49,25 @@ RUN \
rm /tmp/go.tar.gz && \
mkdir -p /home/coder/go && \
# CLAUDE ####################################################################
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
mkdir -p /home/coder/.local/bin && \
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /home/coder/.local/bin/claude; fi && \
if [ -f /root/bin/claude ]; then cp /root/bin/claude /home/coder/.local/bin/claude; fi && \
chmod +x /home/coder/.local/bin/claude 2>/dev/null || true && \
(chmod +x /home/coder/.local/bin/claude 2>/dev/null || true) && \
ln -sf /home/coder/.local/bin/claude /usr/local/bin/claude && \
# OPENCODE ##################################################################
(curl -fsSL https://opencode.ai/install | bash || true) && \
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
mkdir -p /home/coder/.opencode/bin && \
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode; fi && \
chmod +x /home/coder/.opencode/bin/opencode 2>/dev/null || true && \
cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode && \
chmod 0755 /home/coder/.opencode/bin/opencode && \
ln -sf /home/coder/.opencode/bin/opencode /usr/local/bin/opencode && \
opencode --version && \
# NPM: CODEX, COPILOT #######################################################
npm install -g @openai/codex @github/copilot && \
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
# PI ########################################################################
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
# AGENT-BROWSER ##############################################################
npm install -g agent-browser && \
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
runuser -u coder -- agent-browser install && \
# PROFILE ##################################################################
echo '' >> /etc/profile && \
Expand All @@ -69,7 +76,7 @@ RUN \
echo 'export GOPATH="$HOME/go"' >> /etc/profile && \
echo 'export PATH="$GOROOT/bin:$GOPATH/bin:$PATH"' >> /etc/profile && \
# OWNERSHIP ################################################################
chown -R coder:coder /home/coder/.local /home/coder/.opencode /home/coder/go 2>/dev/null || true && \
chown -R coder:coder /home/coder/.local /home/coder/.opencode /home/coder/go && \
# CLEANUP ###################################################################
apt-get clean -y && \
apt-get autoclean -y && \
Expand Down
31 changes: 20 additions & 11 deletions nodejs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ ENV DENO_INSTALL=/usr/local
ENV BUN_INSTALL=/usr/local
ENV NODE_VERSION=24
ENV GLAB_VERSION=1.111.0
ENV OPENCODE_VERSION=1.18.13
ENV CLAUDE_VERSION=2.1.224
ENV DENO_VERSION=2.9.4
ENV BUN_VERSION=1.3.14
ENV CODEX_VERSION=0.147.0
ENV COPILOT_VERSION=1.0.78
ENV PI_VERSION=0.84.1
ENV AGENT_BROWSER_VERSION=0.33.2

USER root

Expand Down Expand Up @@ -35,28 +43,29 @@ RUN \
dpkg -i /tmp/glab.deb && \
rm -f /tmp/glab.deb && \
# DENO ######################################################################
curl -fsSL https://deno.land/install.sh | sh && \
curl -fsSL https://deno.land/install.sh | sh -s v${DENO_VERSION} && \
# BUN #######################################################################
curl -fsSL https://bun.sh/install | bash && \
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" && \
# CLAUDE ####################################################################
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
mkdir -p /home/coder/.local/bin && \
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /home/coder/.local/bin/claude; fi && \
if [ -f /root/bin/claude ]; then cp /root/bin/claude /home/coder/.local/bin/claude; fi && \
chmod +x /home/coder/.local/bin/claude 2>/dev/null || true && \
(chmod +x /home/coder/.local/bin/claude 2>/dev/null || true) && \
ln -sf /home/coder/.local/bin/claude /usr/local/bin/claude && \
# OPENCODE ##################################################################
(curl -fsSL https://opencode.ai/install | bash || true) && \
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
mkdir -p /home/coder/.opencode/bin && \
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode; fi && \
chmod +x /home/coder/.opencode/bin/opencode 2>/dev/null || true && \
cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode && \
chmod 0755 /home/coder/.opencode/bin/opencode && \
ln -sf /home/coder/.opencode/bin/opencode /usr/local/bin/opencode && \
opencode --version && \
# NPM: CODEX, COPILOT #######################################################
npm install -g @openai/codex @github/copilot && \
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
# PI ########################################################################
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
# AGENT-BROWSER ##############################################################
npm install -g agent-browser && \
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
runuser -u coder -- agent-browser install && \
# PROFILE ##################################################################
echo '' >> /etc/profile && \
Expand All @@ -66,7 +75,7 @@ RUN \
echo '[ -d "$DENO_INSTALL/bin" ] && export PATH="$DENO_INSTALL/bin:$PATH"' >> /etc/profile && \
echo '[ -d "$BUN_INSTALL/bin" ] && export PATH="$BUN_INSTALL/bin:$PATH"' >> /etc/profile && \
# OWNERSHIP ################################################################
chown -R coder:coder /home/coder/.local /home/coder/.opencode 2>/dev/null || true && \
chown -R coder:coder /home/coder/.local /home/coder/.opencode && \
# CLEANUP ###################################################################
apt-get clean -y && \
apt-get autoclean -y && \
Expand Down
36 changes: 21 additions & 15 deletions php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ FROM codercom/enterprise-base:ubuntu

ENV NODE_VERSION=24
ENV GLAB_VERSION=1.111.0
ENV OPENCODE_VERSION=1.18.13
ENV CLAUDE_VERSION=2.1.224
ENV COMPOSER_VERSION=2.10.2
ENV CODEX_VERSION=0.147.0
ENV COPILOT_VERSION=1.0.78
ENV PI_VERSION=0.84.1
ENV AGENT_BROWSER_VERSION=0.33.2

USER root

RUN \
# REPOS ####################################################################
apt-get update && \
apt-get install -y --no-install-recommends curl wget software-properties-common gpg && \
apt-get install -y --no-install-recommends curl wget gpg && \
# Node repo (needed for npm tools)
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - && \
# PHP repo
add-apt-repository -y ppa:ondrej/php && \
# GitHub CLI repo
wget -qO /tmp/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg && \
mkdir -p -m 755 /etc/apt/keyrings && \
Expand All @@ -25,7 +30,7 @@ RUN \
apt-get install -y --no-install-recommends \
git jq ripgrep tmux nodejs \
# PHP
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-imap php8.5-intl \
php8.5-cli php8.5-common php8.5-curl php8.5-gd php8.5-intl \
php8.5-mailparse php8.5-mbstring php8.5-mysql php8.5-pgsql php8.5-phpdbg \
php8.5-readline php8.5-redis php8.5-soap php8.5-sqlite3 php8.5-xml \
php8.5-zip php8.5-bcmath php8.5-apcu php8.5-imagick \
Expand All @@ -42,37 +47,38 @@ RUN \
libatk1.0-0 libxrender1 libfontconfig1 libdbus-1-3 libxcb1 libxext6 libx11-6 && \
echo 'variables_order = "EGPCS"' > /etc/php/8.5/cli/conf.d/99-coder.ini && \
# COMPOSER ##################################################################
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} && \
# GLAB (GitLab CLI) ########################################################
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 && \
dpkg -i /tmp/glab.deb && \
rm -f /tmp/glab.deb && \
# CLAUDE ####################################################################
(curl -fsSL https://claude.ai/install.sh | bash || true) && \
(curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_VERSION} || true) && \
mkdir -p /home/coder/.local/bin && \
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /home/coder/.local/bin/claude; fi && \
if [ -f /root/bin/claude ]; then cp /root/bin/claude /home/coder/.local/bin/claude; fi && \
chmod +x /home/coder/.local/bin/claude 2>/dev/null || true && \
(chmod +x /home/coder/.local/bin/claude 2>/dev/null || true) && \
ln -sf /home/coder/.local/bin/claude /usr/local/bin/claude && \
# OPENCODE ##################################################################
(curl -fsSL https://opencode.ai/install | bash || true) && \
curl -fsSL https://opencode.ai/install | VERSION=${OPENCODE_VERSION} bash -s -- --no-modify-path && \
mkdir -p /home/coder/.opencode/bin && \
if [ -f /root/.opencode/bin/opencode ]; then cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode; fi && \
chmod +x /home/coder/.opencode/bin/opencode 2>/dev/null || true && \
cp /root/.opencode/bin/opencode /home/coder/.opencode/bin/opencode && \
chmod 0755 /home/coder/.opencode/bin/opencode && \
ln -sf /home/coder/.opencode/bin/opencode /usr/local/bin/opencode && \
opencode --version && \
# NPM: CODEX, COPILOT #######################################################
npm install -g @openai/codex @github/copilot && \
npm install -g @openai/codex@${CODEX_VERSION} @github/copilot@${COPILOT_VERSION} && \
# PI ########################################################################
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@${PI_VERSION} && \
# AGENT-BROWSER ##############################################################
npm install -g agent-browser && \
npm install -g agent-browser@${AGENT_BROWSER_VERSION} && \
runuser -u coder -- agent-browser install && \
# OWNERSHIP ################################################################
chown -R coder:coder /home/coder/.local /home/coder/.opencode 2>/dev/null || true && \
chown -R coder:coder /home/coder/.local /home/coder/.opencode && \
# CLEANUP ###################################################################
apt-get clean -y && \
apt-get autoclean -y && \
apt-get remove -y wget software-properties-common && \
apt-get remove -y wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/* \
/root/.npm /root/.cache /root/.local /root/.opencode
Expand Down
Loading