[FEATURE] Make Node.js version configurable in devcontainer

Resolved 💬 5 comments Opened Mar 11, 2026 by sakumoto-shota Closed Apr 27, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The current DevContainer Dockerfile hardcodes the Node.js version as FROM node:20.

  • Node 20 Maintenance LTS ends in April 2026
  • Node 22 is the current Active LTS
  • There is no way for users to switch Node.js versions based on their project requirements

Proposed Solution

Make the FROM directive configurable via ARG and allow it to be set from devcontainer.json using a local environment variable.

Dockerfile:

ARG NODE_VERSION=20
FROM node:${NODE_VERSION}

devcontainer.json:

"args": {
  "NODE_VERSION": "${localEnv:NODE_VERSION:20}",
}

Usage:

# Default (Node 20) - no configuration needed

# Switch to Node 22
export NODE_VERSION=22

# Switch to Node 24
export NODE_VERSION=24

Benefits

  • Default remains Node 20 (fully backward compatible)
  • Only 2 lines changed (1 in Dockerfile + 1 in devcontainer.json)
  • Users can flexibly adapt to future LTS transitions

Priority

Low - Nice to have

Feature Category

Configuration and settings

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗