Skip to content

Commit

Permalink
Adds support for Cpp 24.04 and Typescript-node 22 (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale committed May 8, 2024
1 parent 1ff9760 commit a5fe28b
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/cpp/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# [Choice] Debian / Ubuntu version (use Debian 12, Debian 11, Ubuntu 22.04 on local arm64/Apple Silicon): debian-12, debian-11, debian-10, ubuntu-22.04, ubuntu-20.04
ARG VARIANT=debian-12
FROM mcr.microsoft.com/devcontainers/base:${VARIANT}
USER root
Expand Down
5 changes: 3 additions & 2 deletions src/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
| *Categories* | Core, Languages |
| *Image type* | Dockerfile |
| *Published images* | mcr.microsoft.com/devcontainers/cpp |
| *Available image variants* | debian-12, debian-11, debian-10, ubuntu-22.04, ubuntu-20.04 ([full list](https://mcr.microsoft.com/v2/devcontainers/cpp/tags/list)) |
| *Published image architecture(s)* | x86-64, aarch64/arm64 for `debian-12`, `debian-11`,and `ubuntu-22.04` variants |
| *Available image variants* | debian-12, debian-11, debian-10, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04 ([full list](https://mcr.microsoft.com/v2/devcontainers/cpp/tags/list)) |
| *Published image architecture(s)* | x86-64, aarch64/arm64 for `debian-12`, `debian-11`, `ubuntu-24.04` and `ubuntu-22.04` variants |
| *Container host OS support* | Linux, macOS, Windows |
| *Container OS* | Debian, Ubuntu |
| *Languages, platforms* | C++ |
Expand All @@ -27,6 +27,7 @@ You can directly reference pre-built versions of `Dockerfile` by using the `imag
- `mcr.microsoft.com/devcontainers/cpp:debian-11` (or `bullseye`)
- `mcr.microsoft.com/devcontainers/cpp:debian-10` (or `buster`)
- `mcr.microsoft.com/devcontainers/cpp:ubuntu` (latest Ubuntu LTS)
- `mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04` (or `noble`)
- `mcr.microsoft.com/devcontainers/cpp:ubuntu-22.04` (or `jammy`)
- `mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04` (or `focal`)

Expand Down
10 changes: 10 additions & 0 deletions src/cpp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"bookworm",
"bullseye",
"buster",
"noble",
"jammy",
"focal"
],
Expand All @@ -13,6 +14,7 @@
"bookworm": "base-debian",
"bullseye": "base-debian",
"buster": "base-debian",
"noble": "base-ubuntu",
"jammy": "base-ubuntu",
"focal": "base-ubuntu"
},
Expand All @@ -29,6 +31,10 @@
"buster": [
"linux/amd64"
],
"noble": [
"linux/amd64",
"linux/arm64"
],
"jammy": [
"linux/amd64",
"linux/arm64"
Expand Down Expand Up @@ -56,6 +62,10 @@
"cpp:${VERSION}-debian-10",
"cpp:${VERSION}-debian10"
],
"noble": [
"cpp:${VERSION}-ubuntu-24.04",
"cpp:${VERSION}-ubuntu24.04"
],
"jammy": [
"cpp:${VERSION}-ubuntu-22.04",
"cpp:${VERSION}-ubuntu22.04"
Expand Down
3 changes: 1 addition & 2 deletions src/typescript-node/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# [Choice] Node.js version (use -bookworm, or -bullseye variants on local arm64/Apple Silicon): 20, 18, 20-bookworm, 18-bookworm, 20-bullseye, 18-bullseye, 20-buster, 18-buster
ARG VARIANT=20-bookworm
ARG VARIANT=22-bookworm
FROM mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT}

# Install tslint, typescript. eslint is installed by javascript image
Expand Down
9 changes: 5 additions & 4 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-bookworm, 18 / 18-bookworm, 20-bullseye, 18-bullseye, 20-buster, 18-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/typescript-node/tags/list)) |
| *Available image variants* | 22 / 22-bookworm, 20 / 20-bookworm, 18 / 18-bookworm, 22-bullseye, 20-bullseye, 18-bullseye, 20-buster, 18-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/typescript-node/tags/list)) |
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bookworm`, and `bullseye` variants |
| *Container host OS support* | Linux, macOS, Windows |
| *Container OS* | Debian |
Expand All @@ -20,16 +20,17 @@
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/typescript-node` (latest)
- `mcr.microsoft.com/devcontainers/typescript-node:22` (or `22-bookworm`, `22-bullseye` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/typescript-node:20` (or `20-bookworm`, `20-bullseye`, `20-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/typescript-node:18` (or `18-bookworm`, `18-bullseye`, `18-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:1-20` (or `1-20-bookworm`, `1-20-bullseye`, `1-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.0-20` (or `1.0-20-bookworm`, `1.0-20-bullseye`, `1.0-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.0.0-20` (or `1.0.0-20-bookworm`, `1.0.0-20-bullseye`, `1.0.0-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:1-22` (or `1-22-bookworm`, `1-22-bullseye`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.1-22` (or `1.1-22-bookworm`, `1.1-22-bullseye`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.1.0-22` (or `1.1.0-20-bookworm`, `1.1.0-20-bullseye`)

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. `1-1.20`). 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
22 changes: 19 additions & 3 deletions src/typescript-node/manifest.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
"version": "1.0.12",
"variants": [
"22-bookworm",
"20-bookworm",
"18-bookworm",
"22-bullseye",
"20-bullseye",
"18-bullseye",
"20-buster",
"18-buster"
],
"build": {
"latest": "20-bookworm",
"latest": "22-bookworm",
"rootDistro": "debian",
"parent": "javascript-node",
"architectures": {
"22-bookworm": [
"linux/amd64",
"linux/arm64"
],
"20-bookworm": [
"linux/amd64",
"linux/arm64"
Expand All @@ -21,6 +27,10 @@
"linux/amd64",
"linux/arm64"
],
"22-bullseye": [
"linux/amd64",
"linux/arm64"
],
"20-bullseye": [
"linux/amd64",
"linux/arm64"
Expand All @@ -40,13 +50,19 @@
"typescript-node:${VERSION}-${VARIANT}"
],
"variantTags": {
"20-bookworm": [
"typescript-node:${VERSION}-20",
"22-bookworm": [
"typescript-node:${VERSION}-22",
"typescript-node:${VERSION}-bookworm"
],
"20-bookworm": [
"typescript-node:${VERSION}-20"
],
"18-bookworm": [
"typescript-node:${VERSION}-18"
],
"22-bullseye": [
"typescript-node:${VERSION}-bullseye"
],
"20-bullseye": [
"typescript-node:${VERSION}-bullseye"
],
Expand Down
1 change: 0 additions & 1 deletion src/typescript-node/test-project/.eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions src/typescript-node/test-project/.eslintrc.json

This file was deleted.

11 changes: 11 additions & 0 deletions src/typescript-node/test-project/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports={
"rules": {
"no-console": 0,
"eqeqeq":"warn",
"no-cond-assign": 0,
"no-unused-vars": 1,
"no-extra-semi": "warn",
"semi": "warn"
},
ignorePatterns: ["**/node_modules/**"]
};
2 changes: 1 addition & 1 deletion src/typescript-node/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ check "node" node --version
sudo rm -f yarn.lock
check "yarn" yarn install
sudo rm -f package-lock.json
check "eslint" eslint --no-eslintrc -c .eslintrc.json src/server.ts
check "eslint" eslint --no-warn-ignored src/server.ts
check "typescript" npm run compile
check "test-project" npm run test
npm config delete prefix
Expand Down

0 comments on commit a5fe28b

Please sign in to comment.