Skip to content

Commit a8a4b2d

Browse files
feat(node): add private mirror option for Node.js binaries
Introduce the `nvmNodeJsOrgMirror` option to allow using a private Node.js binary mirror. This supports air-gapped or restricted environments by enabling downloads from custom URLs. - Updated README.md and NOTES.md with documentation and usage examples for the new option. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
1 parent d9c9728 commit a8a4b2d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/node/NOTES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,15 @@ Debian/Ubuntu, RedHat Enterprise Linux, Fedora, Alma, and Rocky Linux distributi
2525
**Note**: RedHat 7 Family (RedHat, CentOS, etc.) must use Node versions less than 18 due to its system libraries and long-term support (LTS) policies.
2626

2727
`bash` is required to execute the `install.sh` script.
28+
29+
## Setting a private Node.js mirror
30+
31+
If you need to use a private mirror for downloading Node.js binaries (e.g. in an air-gapped environment), you can use the `nvmNodeJsOrgMirror` option:
32+
33+
```json
34+
"features": {
35+
"ghcr.io/devcontainers/features/node:1": {
36+
"nvmNodeJsOrgMirror": "https://my-private-registry.com/node-dist"
37+
}
38+
}
39+
```

src/node/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Installs Node.js, nvm, yarn, pnpm, and needed dependencies.
2020
| nvmInstallPath | The path where NVM will be installed. | string | /usr/local/share/nvm |
2121
| pnpmVersion | Select or enter the PNPM version to install | string | latest |
2222
| nvmVersion | Version of NVM to install. | string | latest |
23+
| nvmNodeJsOrgMirror | The mirror of the Node.js binaries. Use this to point to a private mirror. | string | - |
2324
| installYarnUsingApt | On Debian and Ubuntu systems, you have the option to install Yarn globally via APT. If you choose not to use this option, Yarn will be set up using Corepack instead. This choice is specific to Debian and Ubuntu; for other Linux distributions, Yarn is always installed using Corepack, with a fallback to installation via NPM if an error occurs. | boolean | true |
2425

2526
## Customizations
@@ -56,6 +57,18 @@ Debian/Ubuntu, RedHat Enterprise Linux, Fedora, Alma, and Rocky Linux distributi
5657

5758
`bash` is required to execute the `install.sh` script.
5859

60+
## Setting a private Node.js mirror
61+
62+
If you need to use a private mirror for downloading Node.js binaries (e.g. in an air-gapped environment), you can use the `nvmNodeJsOrgMirror` option:
63+
64+
```json
65+
"features": {
66+
"ghcr.io/devcontainers/features/node:1": {
67+
"nvmNodeJsOrgMirror": "https://my-private-registry.com/node-dist"
68+
}
69+
}
70+
```
71+
5972

6073
---
6174

0 commit comments

Comments
 (0)