Skip to content

Commit

Permalink
Node 14 - EOL (#553)
Browse files Browse the repository at this point in the history
* Node 14 - EOL

* fix build
  • Loading branch information
samruddhikhandale committed May 5, 2023
1 parent 18cefbc commit 3e64ffb
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 83 deletions.
10 changes: 1 addition & 9 deletions build/src/prep.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ async function prepDockerFile(devContainerDockerfilePath, definitionId, repo, re
prepResult.devContainerDockerfileModified = replaceFrom(prepResult.devContainerDockerfileModified, `FROM ${prepResult.flattenedBaseImageTag}`);
}

// Add variant & image_variant as an argument to the dockerfile
// Add variant as an argument to the dockerfile
if (variant) {
replaceVariantArg(prepResult);
replaceImageVariantEnv(prepResult);
}

// Generate list of other arguments if applicable and add to the dockefile
Expand Down Expand Up @@ -248,13 +247,6 @@ function addBuildArguments(prepResult) {
return prepResult.devContainerDockerfileModified;
}

function replaceImageVariantEnv(prepResult) {
const variantArg = `ENV IMAGE_VARIANT="${prepResult.meta.variant}"\n`;

prepResult.devContainerDockerfileModified = (prepResult.devContainerDockerfileModified).replace(new RegExp(".*ENV IMAGE_VARIANT=.*"), variantArg);
return prepResult.devContainerDockerfileModified;
}

module.exports = {
createStub: createStub,
updateStub: updateStub,
Expand Down
7 changes: 1 addition & 6 deletions src/javascript-node/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# [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
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 20, 18, 16, 20-bullseye, 18-bullseye, 16-bullseye, 20-buster, 18-buster, 16-buster
ARG VARIANT=20-bullseye
FROM node:${VARIANT}

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

ARG USERNAME=node
ARG NPM_GLOBAL=/usr/local/share/npm-global

Expand Down
34 changes: 0 additions & 34 deletions src/javascript-node/.devcontainer/library-scripts/add-patch.sh

This file was deleted.

3 changes: 1 addition & 2 deletions 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* | 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)) |
| *Available image variants* | 20 / 20-bullseye, 18 / 18-bullseye, 16 / 16-bullseye, 20-buster, 18-buster, 16-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 @@ -23,7 +23,6 @@ You can directly reference pre-built versions of `Dockerfile` by using the `imag
- `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)

Refer to [this guide](https://containers.dev/guide/dockerfile) for more details.

Expand Down
14 changes: 1 addition & 13 deletions src/javascript-node/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"20-bullseye",
"18-bullseye",
"16-bullseye",
"14-bullseye",
"20-buster",
"18-buster",
"16-buster",
"14-buster"
"16-buster"
],
"build": {
"latest": "20-bullseye",
Expand All @@ -26,10 +24,6 @@
"linux/amd64",
"linux/arm64"
],
"14-bullseye": [
"linux/amd64",
"linux/arm64"
],
"20-buster": [
"linux/amd64"
],
Expand All @@ -38,9 +32,6 @@
],
"16-buster": [
"linux/amd64"
],
"14-buster": [
"linux/amd64"
]
},
"tags": [
Expand All @@ -57,9 +48,6 @@
"16-bullseye": [
"javascript-node:${VERSION}-16"
],
"14-bullseye": [
"javascript-node:${VERSION}-14"
],
"20-buster": [
"javascript-node:${VERSION}-buster"
]
Expand Down
2 changes: 1 addition & 1 deletion src/typescript-node/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [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
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 20, 18, 16, 20-bullseye, 18-bullseye, 16-bullseye, 20-buster, 18-buster, 16-buster
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/devcontainers/javascript-node:0-${VARIANT}

Expand Down
9 changes: 4 additions & 5 deletions src/typescript-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/typescript-node |
| *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/typescript-node/tags/list)) |
| *Available image variants* | 20 / 20-bullseye, 18 / 18-bullseye, 16 / 16-bullseye, 20-buster, 18-buster, 16-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/typescript-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 @@ -23,15 +23,14 @@ You can directly reference pre-built versions of `Dockerfile` by using the `imag
- `mcr.microsoft.com/devcontainers/typescript-node:20` (or `20-bullseye`, `20-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/typescript-node:18` (or `18-bullseye`, `18-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/typescript-node:16` (or `16-bullseye`, `16-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/typescript-node:14` (or `14-bullseye`, `14-buster` to pin to an OS version)

Refer to [this guide](https://containers.dev/guide/dockerfile) for more details.

You can decide how often you want updates by referencing a [semantic version](https://semver.org/) of each image. For example:

- `mcr.microsoft.com/devcontainers/typescript-node:0-14` (or `0-14-bullseye`, `0-14-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:0.204-14` (or `0.203-14-bullseye`, `0.203-14-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:0.204.0-14` (or `0.203.0-14-bullseye`, `0.203.0-14-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:0-20` (or `0-20-bullseye`, `0-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:0.205-20` (or `0.205-20-bullseye`, `0.205-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:0.205.1-20` (or `0.205.1-20-bullseye`, `0.205.1-20-buster`)

However, we only do security patching on the latest [non-breaking, in support](https://github.com/devcontainers/images/issues/90) versions of images (e.g. `0-1.16`). You may want to run `apt-get update && apt-get upgrade` in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.

Expand Down
14 changes: 1 addition & 13 deletions src/typescript-node/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"20-bullseye",
"18-bullseye",
"16-bullseye",
"14-bullseye",
"20-buster",
"18-buster",
"16-buster",
"14-buster"
"16-buster"
],
"build": {
"latest": "20-buster",
Expand All @@ -27,10 +25,6 @@
"linux/amd64",
"linux/arm64"
],
"14-bullseye": [
"linux/amd64",
"linux/arm64"
],
"20-buster": [
"linux/amd64"
],
Expand All @@ -39,9 +33,6 @@
],
"16-buster": [
"linux/amd64"
],
"14-buster": [
"linux/amd64"
]
},
"tags": [
Expand All @@ -58,9 +49,6 @@
"16-bullseye": [
"typescript-node:${VERSION}-16"
],
"14-bullseye": [
"typescript-node:${VERSION}-14"
],
"20-buster": [
"typescript-node:${VERSION}-buster"
]
Expand Down

0 comments on commit 3e64ffb

Please sign in to comment.