-
Notifications
You must be signed in to change notification settings - Fork 0
Revert "Merge pull request #163 from blooop/claude/npm-pixi-installat… #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Install OpenAI Codex CLI with BuildKit cache for npm global installs | ||
| RUN --mount=type=cache,target=/root/.npm,id=global-npm-cache \ | ||
| npm install -g @@openai/codex |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/bin/bash -l | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| echo "Testing codex installation..." | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Install Google Gemini CLI tool via npm with BuildKit cache for global installs | ||
| RUN --mount=type=cache,target=/root/.npm,id=global-npm-cache \ | ||
| npm install -g @@google/gemini-cli |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/bin/bash -l | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| echo "Testing gemini installation..." | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # syntax=docker/dockerfile:1.4 | ||
| ARG NODE_VERSION=@NODE_VERSION@ | ||
|
|
||
| @(f"FROM {base_image} AS {builder_stage}") | ||
|
|
||
| ARG NODE_VERSION | ||
| ENV NVM_DIR=/usr/local/nvm | ||
|
|
||
| RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache \ | ||
| --mount=type=cache,target=/var/lib/apt/lists,sharing=locked,id=apt-lists \ | ||
| apt-get update && \ | ||
| apt-get install -y --no-install-recommends git && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Clone nvm from git with caching | ||
| RUN --mount=type=cache,target=/tmp/nvm-git-cache,id=nvm-git-cache \ | ||
| bash -c "set -e && \ | ||
| if [ -d /tmp/nvm-git-cache/.git ]; then \ | ||
| cd /tmp/nvm-git-cache && git fetch --tags && git checkout v0.40.3; \ | ||
| else \ | ||
| git clone https://github.com/nvm-sh/nvm.git /tmp/nvm-git-cache && \ | ||
| cd /tmp/nvm-git-cache && git checkout v0.40.0; \ | ||
| fi && \ | ||
| # Use tar to copy nvm cache, excluding .git, test, and .github for smaller image and security | ||
| # Ensure /usr/local/nvm exists before extracting | ||
| mkdir -p /usr/local/nvm && tar --exclude='.git' --exclude='test' --exclude='.github' -cf - -C /tmp/nvm-git-cache . | tar -xf - -C /usr/local/nvm" | ||
|
|
||
| # Install Node.js using nvm with cached downloads - use template substitution for version | ||
| RUN --mount=type=cache,target=/usr/local/nvm/.cache,id=nvm-node-cache \ | ||
| bash -c "set -e && \ | ||
| . \$NVM_DIR/nvm.sh && \ | ||
| nvm install @(NODE_VERSION)" | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||||||||
|
|
||||||||||||||
| ENV NODE_VERSION=24.9.0 | ||||||||||||||
| # Install nvm, node and npm | ||||||||||||||
| ENV NVM_DIR=/usr/local/nvm | ||||||||||||||
|
Comment on lines
+2
to
+4
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (bug_risk): Avoid hardcoding NODE_VERSION in the runtime snippet to prevent drift from the builder configuration. The builder uses
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| ENV NPM_CONFIG_UPDATE_NOTIFIER=false | ||||||||||||||
| ENV NPM_CONFIG_FUND=false | ||||||||||||||
|
|
||||||||||||||
| # Copy pre-installed nvm directory from builder | ||||||||||||||
| @(f"COPY --from={builder_stage} $NVM_DIR $NVM_DIR") | ||||||||||||||
|
|
||||||||||||||
| # Add node and npm to path | ||||||||||||||
| ENV PATH="$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH" | ||||||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #!/bin/bash -l | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| echo "Testing npm installation..." | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Align the nvm tag between the cache-hit and fresh-clone paths.
Using v0.40.3 in the cache-hit path and v0.40.0 in the fresh-clone path means builds can produce different environments depending on cache state. Please use the same tag in both branches, ideally defined once (e.g., as a build arg or variable) to prevent future drift.