-
Notifications
You must be signed in to change notification settings - Fork 15
Migrate devcontainer to Docker Compose and update toolchain #681
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM ghcr.io/framework-r-d/phlex-dev:latest | ||
| FROM ghcr.io/framework-r-d/phlex-dev:2026-06-24 | ||
|
|
||
| # Validate Python site-packages symlink. | ||
| # Invoke bash explicitly: the script uses bash features (pipefail, arrays, | ||
|
|
@@ -88,15 +88,26 @@ if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then | |
| fi | ||
| INSTALL_MAN_TOOLS | ||
|
|
||
| # Install podman client and socat inside the container to support nested | ||
| # Install dev utils | ||
| # container communication and provide a 'docker' command alias. | ||
| RUN bash <<'INSTALL_PODMAN_CLIENT' | ||
| RUN bash <<'INSTALL_DEV_UTILS' | ||
| set -euo pipefail | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends ssh podman socat | ||
| apt-get install -y --no-install-recommends jq podman ssh socat tree yq | ||
| apt purge nodejs npm -y && apt autoremove -y || true | ||
| apt-get install -y curl --no-install-recommends --autoremove | ||
| curl -fsSL https://deb.nodesource.com/setup_26.x | bash - | ||
| apt-get install -y nodejs | ||
| apt-get clean | ||
| rm -rf /var/lib/apt/lists/* | ||
| INSTALL_PODMAN_CLIENT | ||
| INSTALL_DEV_UTILS | ||
|
|
||
| RUN bash <<'INSTALL_NPM_PACKAGES' | ||
| set -euo pipefail | ||
| npm -g update | ||
| npm config set allow-scripts=@kilocode/cli --location=user | ||
| npm install -g @kilocode/cli | ||
|
Comment on lines
+108
to
+109
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🌐 Web query:
💡 Result: Yes, npm now supports an allowScripts configuration to selectively permit lifecycle scripts for specific packages, a feature introduced as part of an opt-in security policy in recent versions of npm (starting with v11.10.0) [1]. How to Manage Lifecycle Scripts: 1. Project-Level Control (Recommended): The supported way to manage this in a project is using the allowScripts field in your package.json [2][3]. You can maintain this list using two built-in commands: - npm approve-scripts : Adds a package to the allowlist in your package.json [3][4]. By default, this pins the approval to the specific version currently installed [3][5]. - npm deny-scripts : Explicitly denies a package, ensuring it cannot run install scripts even if future versions are updated [4]. 2. One-off and Global Contexts: For global installs (npm install -g) or one-off executions (npm exec, npx), where no project package.json exists, you can use the --allow-scripts CLI flag (e.g., --allow-scripts=pkg1,pkg2) [2][3][6]. Note that using --allow-scripts during a project-scoped npm install is considered an error, as team-wide policy should be managed via package.json or.npmrc to avoid inconsistency [2][7][6]. 3. Legacy/Alternative Restriction: If you want to globally restrict install scripts (the most secure approach), you can continue to use the ignore-scripts configuration [8][9][10]. - You can set this globally by running: npm config set ignore-scripts true [10]. - Alternatively, you can run any install command with the flag: npm install --ignore-scripts [8][9][10]. In the current version, the allowScripts policy is advisory; unapproved scripts will still execute, but they will be reported in an end-of-install summary [11][1][4]. Future releases of npm are planned to make these policies a hard block [2][1][4]. Top results: [2][3][11][6][4] Citations:
🤖 Prompt for AI Agents |
||
| INSTALL_NPM_PACKAGES | ||
|
|
||
| # Wire up the root user's .bashrc to source the Spack environment via | ||
| # /entrypoint.sh on every interactive shell. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| version: "3.8" | ||
|
|
||
| services: | ||
| phlex-dev: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| volumes: | ||
| - ..:/workspaces/phlex | ||
| - ../../phlex-coding-guidelines:/workspaces/phlex-coding-guidelines | ||
| - ../../phlex-design:/workspaces/phlex-design | ||
| - ../../phlex-examples:/workspaces/phlex-examples | ||
| - ../../phlex-spack-recipes:/workspaces/phlex-spack-recipes | ||
| - ${HOME}/.config/gh:/root/.config/gh:ro | ||
| - ${HOME}/.config/kilo:/root/.config/kilo | ||
| - ${HOME}/.gnupg:/root/.gnupg | ||
| - ${HOME}/.podman-proxy/podman.sock:/tmp/podman.sock | ||
| - phlex-kilo-data:/root/.local/share/kilo | ||
| - phlex-vscode-user-data:/root/.vscode-server-insiders/data/User | ||
| env_file: | ||
| - ${HOME}/.phlex-kilo.env | ||
|
Comment on lines
+20
to
+21
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. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win This
🤖 Prompt for AI Agents |
||
| environment: | ||
| - CMAKE_GENERATOR=Ninja | ||
| - GH_CONFIG_DIR=/root/.config/gh | ||
| - DOCKER_HOST=unix:///tmp/podman.sock | ||
| - CONTAINER_HOST=unix:///tmp/podman.sock | ||
| - GNUPGHOME=/root/.gnupg | ||
| user: root | ||
| tty: true | ||
| stdin_open: true | ||
|
|
||
| volumes: | ||
| phlex-kilo-data: | ||
| phlex-vscode-user-data: | ||
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.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Drop
npm -g updatefrom the image build.This makes the devcontainer drift on every rebuild against the live registry, which undercuts the new pinning work here. Install only the tool you need, ideally at an explicit
@kilocode/cliversion.🤖 Prompt for AI Agents