From 6b6520c640fa3a201abe8c9b82fabdc0dd333828 Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Fri, 23 Jun 2023 15:36:05 -0700 Subject: [PATCH] Node templates: Add debian:bookworm options & remove the ones without OS bit (#172) * Node templates: Support debian:bookworm * https://github.com/devcontainers/templates/issues/174 * use bullseye as default * Update devcontainer.json --- .devcontainer/devcontainer.json | 15 +++++++-------- src/docker-in-docker/NOTES.md | 2 +- src/docker-outside-of-docker-compose/NOTES.md | 2 +- src/docker-outside-of-docker/NOTES.md | 2 +- .../.devcontainer/Dockerfile | 2 +- .../devcontainer-template.json | 17 +++++++---------- .../.devcontainer/devcontainer.json | 2 +- src/javascript-node/devcontainer-template.json | 12 ++++++------ src/kubernetes-helm-minikube/NOTES.md | 2 +- src/kubernetes-helm/NOTES.md | 2 +- .../.devcontainer/devcontainer.json | 2 +- src/typescript-node/devcontainer-template.json | 16 ++++++++-------- 12 files changed, 36 insertions(+), 40 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 806d66a9..74ca75ed 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,9 @@ { - "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", + "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + }, + "postCreateCommand": "npm install -g @devcontainers/cli", "customizations": { "vscode": { "extensions": [ @@ -8,10 +12,5 @@ "editorconfig.editorconfig" ] } - }, - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {} - }, - "postCreateCommand": "npm install -g @devcontainers/cli", - "remoteUser": "node" -} \ No newline at end of file + } +} diff --git a/src/docker-in-docker/NOTES.md b/src/docker-in-docker/NOTES.md index 49eefdba..99189cf3 100644 --- a/src/docker-in-docker/NOTES.md +++ b/src/docker-in-docker/NOTES.md @@ -11,5 +11,5 @@ For this technique to work, the "Docker in Docker" Feature included in this temp The included `.devcontainer.json` can be altered to work with other Debian/Ubuntu-based container images such as `node` or `python`. For example, to use `mcr.microsoft.com/devcontainers/javascript-node`, update the `image` proprty as follows: ```json -"image": "mcr.microsoft.com/devcontainers/javascript-node:18" +"image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye" ``` \ No newline at end of file diff --git a/src/docker-outside-of-docker-compose/NOTES.md b/src/docker-outside-of-docker-compose/NOTES.md index 63cb82ad..277b9fcf 100644 --- a/src/docker-outside-of-docker-compose/NOTES.md +++ b/src/docker-outside-of-docker-compose/NOTES.md @@ -7,7 +7,7 @@ This example illustrates how you can do this by running CLI commands and using t The included `.devcontainer/Dockerfile` can be altered to work with other Debian/Ubuntu-based container images such as `node` or `python`. ```Dockerfile -FROM mcr.microsoft.com/devcontainers/javascript-node:18 +FROM mcr.microsoft.com/devcontainers/javascript-node:18-bullseye ``` ## Using bind mounts when working with Docker inside the container diff --git a/src/docker-outside-of-docker/NOTES.md b/src/docker-outside-of-docker/NOTES.md index d7e77360..32338659 100644 --- a/src/docker-outside-of-docker/NOTES.md +++ b/src/docker-outside-of-docker/NOTES.md @@ -7,7 +7,7 @@ This example illustrates how you can do this by running CLI commands and using t The included `.devcontainer.json` can be altered to work with other Debian/Ubuntu-based container images such as `node` or `python`. For example, to use `mcr.microsoft.com/devcontainers/javascript-node`, update the `image` proprty as follows: ```json -"image": "mcr.microsoft.com/devcontainers/javascript-node:18" +"image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye" ``` ## Using bind mounts when working with Docker inside the container diff --git a/src/javascript-node-postgres/.devcontainer/Dockerfile b/src/javascript-node-postgres/.devcontainer/Dockerfile index 3d0bcc63..75a5be10 100644 --- a/src/javascript-node-postgres/.devcontainer/Dockerfile +++ b/src/javascript-node-postgres/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/javascript-node:0-${templateOption:imageVariant} +FROM mcr.microsoft.com/devcontainers/javascript-node:1-${templateOption:imageVariant} # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ diff --git a/src/javascript-node-postgres/devcontainer-template.json b/src/javascript-node-postgres/devcontainer-template.json index 0f56e3d1..ea9ba064 100644 --- a/src/javascript-node-postgres/devcontainer-template.json +++ b/src/javascript-node-postgres/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "javascript-node-postgres", - "version": "1.2.0", + "version": "2.0.0", "name": "Node.js & PostgreSQL", "description": "Develop applications in Node.js and PostgreSQL. Includes Node.js, eslint, and yarn in a container linked to a Postgres DB container", "documentationURL": "https://github.com/devcontainers/templates/tree/main/src/javascript-node-postgres", @@ -9,22 +9,19 @@ "options": { "imageVariant": { "type": "string", - "description": "Node.js version (use -bullseye variants on local arm64/Apple Silicon):", + "description": "Node.js version (use -bookworm, -bullseye variants on local arm64/Apple Silicon):", "proposals": [ - "20", - "18", - "16", - "14", + "20-bookworm", + "18-bookworm", + "16-bookworm", "20-bullseye", "18-bullseye", "16-bullseye", - "14-bullseye", "20-buster", "18-buster", - "16-buster", - "14-buster" + "16-buster" ], - "default": "20" + "default": "20-bullseye" } }, "platforms": [ diff --git a/src/javascript-node/.devcontainer/devcontainer.json b/src/javascript-node/.devcontainer/devcontainer.json index 14a33106..1da06303 100644 --- a/src/javascript-node/.devcontainer/devcontainer.json +++ b/src/javascript-node/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Node.js", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/javascript-node:0-${templateOption:imageVariant}" + "image": "mcr.microsoft.com/devcontainers/javascript-node:1-${templateOption:imageVariant}" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/src/javascript-node/devcontainer-template.json b/src/javascript-node/devcontainer-template.json index 945eef2c..5e7155d5 100644 --- a/src/javascript-node/devcontainer-template.json +++ b/src/javascript-node/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "javascript-node", - "version": "1.2.1", + "version": "2.0.0", "name": "Node.js & JavaScript", "description": "Develop Node.js based applications. Includes Node.js, eslint, nvm, and yarn.", "documentationURL": "https://github.com/devcontainers/templates/tree/main/src/javascript-node", @@ -9,11 +9,11 @@ "options": { "imageVariant": { "type": "string", - "description": "Node.js version (use -bullseye variants on local arm64/Apple Silicon):", + "description": "Node.js version (use -bookworm, -bullseye variants on local arm64/Apple Silicon):", "proposals": [ - "20", - "18", - "16", + "20-bookworm", + "18-bookworm", + "16-bookworm", "20-bullseye", "18-bullseye", "16-bullseye", @@ -21,7 +21,7 @@ "18-buster", "16-buster" ], - "default": "20" + "default": "20-bullseye" } }, "platforms": [ diff --git a/src/kubernetes-helm-minikube/NOTES.md b/src/kubernetes-helm-minikube/NOTES.md index 2ed047e8..7ae02954 100644 --- a/src/kubernetes-helm-minikube/NOTES.md +++ b/src/kubernetes-helm-minikube/NOTES.md @@ -7,7 +7,7 @@ This example illustrates how you can do this by using CLIs ([kubectl](https://ku The included `.devcontainer.json` can be altered to work with other Debian/Ubuntu-based container images such as `node` or `python`. For example, to use `mcr.microsoft.com/devcontainers/javascript-node`, update the `image` proprty as follows: ```json -"image": "mcr.microsoft.com/devcontainers/javascript-node:18" +"image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye" ``` diff --git a/src/kubernetes-helm/NOTES.md b/src/kubernetes-helm/NOTES.md index ab27e571..4f484373 100644 --- a/src/kubernetes-helm/NOTES.md +++ b/src/kubernetes-helm/NOTES.md @@ -7,7 +7,7 @@ Dev containers can be useful for all types of applications including those that The included `.devcontainer.json` can be altered to work with other Debian/Ubuntu-based container images such as `node` or `python`. For example, to use `mcr.microsoft.com/devcontainers/javascript-node`, update the `image` proprty as follows: ```json -"image": "mcr.microsoft.com/devcontainers/javascript-node:18" +"image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye" ``` diff --git a/src/typescript-node/.devcontainer/devcontainer.json b/src/typescript-node/.devcontainer/devcontainer.json index 67d20cbc..310dbae9 100644 --- a/src/typescript-node/.devcontainer/devcontainer.json +++ b/src/typescript-node/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Node.js & TypeScript", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:0-${templateOption:imageVariant}" + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-${templateOption:imageVariant}" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/src/typescript-node/devcontainer-template.json b/src/typescript-node/devcontainer-template.json index 171db29b..61309565 100644 --- a/src/typescript-node/devcontainer-template.json +++ b/src/typescript-node/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "typescript-node", - "version": "1.2.1", + "version": "2.0.0", "name": "Node.js & TypeScript", "description": "Develop Node.js based applications in TypeScript. Includes Node.js, eslint, nvm, yarn, and the TypeScript compiler.", "documentationURL": "https://github.com/devcontainers/templates/tree/main/src/typescript-node", @@ -9,19 +9,19 @@ "options": { "imageVariant": { "type": "string", - "description": "Node.js version (use -bullseye variants on local arm64/Apple Silicon):", + "description": "Node.js version (use -bookworm, -bullseye variants on local arm64/Apple Silicon):", "proposals": [ - "20", - "18", - "16", - "20-bullseye", + "20-bookworm", + "18-bookworm", + "16-bookworm", + "20-bullseye", "18-bullseye", "16-bullseye", - "20-buster", + "20-buster", "18-buster", "16-buster" ], - "default": "20" + "default": "20-bullseye" } }, "platforms": [