GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: make use of Nix files to set up dev env by aduh95 · Pull Request #22 · nodejs/devcontainer

Conversation

@aduh95

@aduh95 aduh95 commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

I first attempted to create the Docker image using Nix tools, but that ended up being too complicated, in the end it was easier to install Nix from the Dockerfile, and update the existing scripts to use Nix provided tools.

Worth noting the image contains a node built with all shared libs, similar to what builds test-shared GHA workflow on nodejs/node; we could certainly disable that to use the vendored static deps instead, the tradeoff being the build would take longer.

Fixes: #18

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95
feat: make use of Nix files to set up dev env
f6543b1
aduh95
aduh95 commented Dec 8, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added 2 commits December 8, 2025 10:48
@aduh95
Update Dockerfile
3a89bf6
@aduh95
Use the same Nix version as the one tested by GHA
7534642
aduh95
aduh95 commented Dec 8, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aduh95
fix PATH
885db6b
joyeecheung
joyeecheung reviewed Dec 9, 2025
View reviewed changes
Comment thread scripts/build.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Dec 9, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added 3 commits December 9, 2025 19:53
@aduh95
add direnv and USE_SHARED_LIBS arg
cfde596
@aduh95
fixup! move ARG down to avoid needlesly invalidate cache
b7b5eed
@aduh95
squash! also use vendored ICU
a8c190f
@joyeecheung

joyeecheung commented Dec 19, 2025

Copy link
Copy Markdown
Member

Kicked off a build to see if the image built from this branch works https://github.com/joyeecheung/devcontainer/actions/runs/20376852332 (when it's done it'll be published to https://hub.docker.com/r/joyeecheung/node-devcontainer)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Dec 19, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 commented Dec 19, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95 and others added 2 commits December 20, 2025 00:26
@aduh95 @joyeecheung
Add comments
6b487ff
Co-authored-by: Joyee Cheung <[email protected]>
@aduh95
fixup! Add comments
5686fcf
joyeecheung
joyeecheung reviewed Dec 21, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Dec 23, 2025
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added 2 commits December 24, 2025 01:00
@aduh95
fix quoting in install-node
7f78042
@aduh95
add IMAGE_VARIANT build var
17b2b04
joyeecheung
joyeecheung approved these changes Jan 13, 2026
View reviewed changes

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

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.

LGTM with a suggestion on docs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread envrc/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Jan 13, 2026
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Jan 13, 2026
View reviewed changes
Comment thread Dockerfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 commented Jan 13, 2026
View reviewed changes
Comment thread envrc/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 @joyeecheung
Apply suggestions from code review
b429723
Co-authored-by: Joyee Cheung <[email protected]>
joyeecheung
joyeecheung approved these changes Jan 13, 2026
View reviewed changes

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

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.

New test run: https://github.com/joyeecheung/devcontainer/actions/runs/20969928645

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95

aduh95 commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

New test run: https://github.com/joyeecheung/devcontainer/actions/runs/20969928645

Looks like it built successfully, not sure how to test it further though

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Jan 17, 2026
View reviewed changes
Comment thread Dockerfile
# Setting up direnv for the local clone, see envrc/README.md for more info
COPY --chown=root:developer --chmod=0755 ./envrc/ /home/developer/envrc/
ARG IMAGE_VARIANT=static-libs
RUN cp "/home/developer/envrc/${IMAGE_VARIANT}.envrc" /home/developer/nodejs/node/.envrc

@joyeecheung joyeecheung Jan 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

I gave it a try and I think this now needs an update in the devcontainer.json - at least, when paired with the default published image invariant (which uses static-lib). This is because devcontainers work by mounting the working dir, which overrides the .envrc copied within the container.

  "postStartCommand": "cp /home/developer/envrc/static-libs.envrc /home/developer/nodejs/node/.envrc && direnv allow /home/developer/nodejs/node"

If we add more published variant in the future, we can just add another devcontainer.json variant in the upstream that copy the corresponding envrc for a different paired image (e.g. "nodejs/devcontainer:shared-nightly" pairs with shared-libs.envrc, and then you can spin a devcontainer with a readily built shared lib configuration to test things)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@joyeecheung joyeecheung Jan 17, 2026

Copy link
Copy Markdown
Member

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.

Opened nodejs/node#61414

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
joyeecheung added a commit to joyeecheung/node that referenced this pull request Jan 17, 2026
@joyeecheung
build: update devcontainer.json to use paired nix env
29629b6
Refs: nodejs/devcontainer#22
@joyeecheung joyeecheung mentioned this pull request Jan 17, 2026
build: update devcontainer.json to use paired nix env nodejs/node#61414
Merged
@joyeecheung
joyeecheung merged commit ca4b8ad into main Jan 17, 2026
@joyeecheung
joyeecheung deleted the nix-env branch January 17, 2026 22:21
nodejs-github-bot pushed a commit to nodejs/node that referenced this pull request Jan 19, 2026
@joyeecheung
build: update devcontainer.json to use paired nix env
bc9ffc3
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
@aduh95 aduh95 mentioned this pull request Jan 19, 2026
tools: copyedit Nix files nodejs/node#61447
Merged
aduh95 pushed a commit to nodejs/node that referenced this pull request Jan 20, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
1b4b5eb
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
@joyeecheung joyeecheung mentioned this pull request Jan 27, 2026
Option to have a shared V8 library? nodejs/node#53509
Open
aduh95 pushed a commit to nodejs/node that referenced this pull request Jan 27, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
b3a7a8c
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
aduh95 pushed a commit to nodejs/node that referenced this pull request Feb 17, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
acff6b0
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
aduh95 pushed a commit to nodejs/node that referenced this pull request Feb 19, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
010b1cc
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
aduh95 pushed a commit to nodejs/node that referenced this pull request Feb 21, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
ab4db92
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
aduh95 pushed a commit to nodejs/node that referenced this pull request Feb 21, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
6a0c9d1
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
aduh95 pushed a commit to nodejs/node that referenced this pull request Feb 23, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
1755786
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
aduh95 pushed a commit to nodejs/node that referenced this pull request Feb 24, 2026
@joyeecheung @aduh95
build: update devcontainer.json to use paired nix env
5b49759
Refs: nodejs/devcontainer#22
PR-URL: #61414
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@joyeecheung joyeecheung joyeecheung approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Re-use the Nix env that's being tested on nodejs/node

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@aduh95 @joyeecheung
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.