Skip to content

Commit

Permalink
Javascript-Node: Support Node v20 (devcontainers#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale authored Apr 20, 2023
1 parent 41fa665 commit ad31564
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 23 deletions.
6 changes: 3 additions & 3 deletions src/javascript-node/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=18-bullseye
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 20, 18, 16, 14, 20-bullseye, 18-bullseye, 16-bullseye, 14-bullseye, 20-buster, 18-buster, 16-buster, 14-buster
ARG VARIANT=20-bullseye
FROM node:${VARIANT}

ENV IMAGE_VARIANT="18-bullseye"
ENV IMAGE_VARIANT="20-bullseye"

COPY library-scripts/add-patch.sh /tmp/library-scripts/
RUN bash /tmp/library-scripts/add-patch.sh "${IMAGE_VARIANT}" && rm -rf /tmp/library-scripts
Expand Down
3 changes: 2 additions & 1 deletion src/javascript-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| *Categories* | Core, Languages |
| *Image type* | Dockerfile |
| *Published image* | mcr.microsoft.com/devcontainers/javascript-node |
| *Available image variants* | 18 / 18-bullseye, 16 / 16-bullseye, 14 / 14-bullseye, 18-buster, 16-buster, 14-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/javascript-node/tags/list)) |
| *Available image variants* | 20 / 20-bullseye, 18 / 18-bullseye, 16 / 16-bullseye, 14 / 14-bullseye, 20-buster, 18-buster, 16-buster, 14-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/javascript-node/tags/list)) |
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bullseye` variants |
| *Container host OS support* | Linux, macOS, Windows |
| *Container OS* | Debian |
Expand All @@ -20,6 +20,7 @@
You can directly reference pre-built versions of `Dockerfile` by using the `image` property in `.devcontainer/devcontainer.json` or updating the `FROM` statement in your own `Dockerfile` to one of the following. An example `Dockerfile` is included in this repository.

- `mcr.microsoft.com/devcontainers/javascript-node` (latest)
- `mcr.microsoft.com/devcontainers/javascript-node:20` (or `20-bullseye`, `20-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/javascript-node:18` (or `18-bullseye`, `18-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/javascript-node:16` (or `16-bullseye`, `16-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/javascript-node:14` (or `14-bullseye`, `14-buster` to pin to an OS version)
Expand Down
78 changes: 59 additions & 19 deletions src/javascript-node/manifest.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,79 @@
{
"version": "0.204.20",
"variants": ["18-bullseye", "16-bullseye", "14-bullseye", "18-buster", "16-buster", "14-buster"],
"variants": [
"20-bullseye",
"18-bullseye",
"16-bullseye",
"14-bullseye",
"20-buster",
"18-buster",
"16-buster",
"14-buster"
],
"build": {
"latest": "18-bullseye",
"latest": "20-bullseye",
"rootDistro": "debian",
"architectures": {
"18-bullseye": ["linux/amd64", "linux/arm64"],
"16-bullseye": ["linux/amd64", "linux/arm64"],
"14-bullseye": ["linux/amd64", "linux/arm64"],
"18-buster": ["linux/amd64"],
"16-buster": ["linux/amd64"],
"14-buster": ["linux/amd64"]
"20-bullseye": [
"linux/amd64",
"linux/arm64"
],
"18-bullseye": [
"linux/amd64",
"linux/arm64"
],
"16-bullseye": [
"linux/amd64",
"linux/arm64"
],
"14-bullseye": [
"linux/amd64",
"linux/arm64"
],
"20-buster": [
"linux/amd64"
],
"18-buster": [
"linux/amd64"
],
"16-buster": [
"linux/amd64"
],
"14-buster": [
"linux/amd64"
]
},
"tags": [
"javascript-node:${VERSION}-${VARIANT}"
],
"variantTags": {
"18-bullseye": [
"javascript-node:${VERSION}-18",
"20-bullseye": [
"javascript-node:${VERSION}-20",
"javascript-node:${VERSION}-bullseye"
],
"16-bullseye": [ "javascript-node:${VERSION}-16" ],
"14-bullseye": [ "javascript-node:${VERSION}-14" ],
"18-buster": [
"18-bullseye": [
"javascript-node:${VERSION}-18"
],
"16-bullseye": [
"javascript-node:${VERSION}-16"
],
"14-bullseye": [
"javascript-node:${VERSION}-14"
],
"20-buster": [
"javascript-node:${VERSION}-buster"
]
}
},
},
"dependencies": {
"image": "node:${VARIANT}",
"imageLink": "https://hub.docker.com/_/node",
"apt": [{
"cgIgnore": false,
"name": "yarn"
}],
"apt": [
{
"cgIgnore": false,
"name": "yarn"
}
],
"git": {
"Oh My Zsh!": "/home/node/.oh-my-zsh",
"nvm": "/usr/local/share/nvm"
Expand All @@ -51,4 +91,4 @@
"git": {}
}
}
}
}

0 comments on commit ad31564

Please sign in to comment.