Skip to content

Commit d2057cf

Browse files
committed
feat(code-server): Enhance Node.js installation and add AI CLIs
- code-server/Dockerfile: Install Fast Node Manager (fnm) and Node.js LTS - code-server/Dockerfile: Upgrade npm and install global AI CLIs - code-server/Dockerfile: Install Antigravity CLI globally - code-server/Dockerfile: Clear npm cache and fix ownership for fnm directory run-ci
1 parent 5aa5370 commit d2057cf

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

code-server/Dockerfile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,28 @@ COPY --from=ebpf_tools_builder --chown=${PUID}:${PGID} $EBPF_TOOLS_HOME $EBPF_TO
332332

333333
RUN set -ex && \
334334
\
335-
# Install Fast Node Manager (fnm) and Node.js
335+
# Install fnm binary
336336
curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell --install-dir $FNM_DIR && \
337-
$FNM_DIR/fnm install --lts --fnm-dir=$FNM_DIR && \
337+
\
338+
# Hook fnm into the current build step
339+
eval "$($FNM_DIR/fnm env --shell bash)" && \
340+
\
341+
# Download Node LTS and activate it in the current shell simultaneously
342+
fnm use --install-if-missing lts/latest && \
343+
\
344+
# Upgrade npm and install global AI CLIs (npm is now instantly available)
345+
npm install -g npm@latest --no-audit --no-fund && \
346+
npm install -g @openai/codex@latest --no-audit --no-fund && \
347+
npm install -g @anthropic-ai/claude-code@latest --no-audit --no-fund && \
348+
\
349+
# Clear npm cache
350+
npm cache clean --force && \
351+
rm -rf /root/.npm /root/.cache && \
352+
\
353+
# Install Antigravity CLI globally
354+
curl -fsSL https://antigravity.google/cli/install.sh | bash -s -- --dir /usr/local/bin && \
355+
\
356+
# Fix ownership for the fnm directory
338357
chown -R ${PUID}:${PGID} $FNM_DIR && \
339358
\
340359
# Remove temporary and unnecessary files

0 commit comments

Comments
 (0)