Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
de8c2b7
Initial plan
Copilot Feb 26, 2026
c0d7861
fix: sync template image versions with devcontainers/images manifests
Copilot Feb 26, 2026
edd0fcc
revert: undo ruby and ruby-rails-postgres template changes
Copilot Feb 26, 2026
889463c
feat: add missing trixie variants, update defaults, and bump major ve…
Copilot Feb 26, 2026
f80e8eb
fix: replace flaky GitHub maven-wrapper download with Apache Maven in…
Copilot Feb 26, 2026
8af970f
revert: rollback java-postgres test.sh to original maven-wrapper version
Copilot Feb 26, 2026
828218c
fix: replace network_mode with bridge network in java-postgres docker…
Copilot Feb 26, 2026
566d1ec
fix: revert test/java-postgres/test.sh to baseline and fix typo on li…
Copilot Feb 26, 2026
c12ea2e
fix: update postgres volume mount path for PostgreSQL 18+ compatibility
Copilot Feb 26, 2026
d979901
fix: update javascript-node-postgres network config and postgres volu…
Copilot Feb 26, 2026
5e81cc2
fix: update javascript-node-postgres test db host from localhost to db
Copilot Feb 26, 2026
8901a14
Remove trixie variants from javascript-node-mongo and default to 24-b…
Copilot Feb 26, 2026
3df10ac
Include php, php-mariadb, and jekyll template changes from closed PR …
Copilot Feb 26, 2026
c720a30
Remove invalid Python variants not present in MCR
Copilot Feb 26, 2026
4e1f830
Add 8-trixie and 8-bookworm variants to java and java-postgres templates
Copilot Feb 26, 2026
30ad481
Merge branch 'main' into copilot/update-template-images-versions
Kaniska244 Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cpp-mariadb/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/cpp:1-${templateOption:imageVariant}
FROM mcr.microsoft.com/devcontainers/cpp:2-${templateOption:imageVariant}

# Everything below this is needed for installing MariaDB
# Instructions are copied and modified from: https://mariadb.com/docs/clients/mariadb-connectors/connector-cpp/install/
Expand Down
8 changes: 4 additions & 4 deletions src/cpp-mariadb/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "cpp-mariadb",
"version": "3.1.0",
"version": "4.0.0",
"name": "C++ & MariaDB",
"description": "Develop C++ applications on Linux. Includes Debian C++ build tools.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/cpp-mariadb",
Expand All @@ -9,14 +9,14 @@
"options": {
"imageVariant": {
"type": "string",
"description": "Debian / Ubuntu version (use Debian 12, Debian 11, Ubuntu 24.04, and Ubuntu 22.04 on local arm64/Apple Silicon):",
"description": "Debian / Ubuntu version (use Debian 13, Debian 12, Ubuntu 24.04, and Ubuntu 22.04 on local arm64/Apple Silicon):",
"proposals": [
"debian13",
"debian12",
"debian11",
"ubuntu24.04",
"ubuntu22.04"
],
"default": "debian12"
"default": "debian13"
},
"reinstallCmakeVersionFromSource": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/cpp:1-${templateOption:imageVariant}
FROM mcr.microsoft.com/devcontainers/cpp:2-${templateOption:imageVariant}

ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="${templateOption:reinstallCmakeVersionFromSource}"

Expand Down
8 changes: 4 additions & 4 deletions src/cpp/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "cpp",
"version": "3.1.0",
"version": "4.0.0",
"name": "C++",
"description": "Develop C++ applications on Linux. Includes Debian C++ build tools.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/cpp",
Expand All @@ -9,14 +9,14 @@
"options": {
"imageVariant": {
"type": "string",
"description": "Debian / Ubuntu version (use Debian 12, Debian 11, Ubuntu 24.04, and Ubuntu 22.04 on local arm64/Apple Silicon):",
"description": "Debian / Ubuntu version (use Debian 13, Debian 12, Ubuntu 24.04, and Ubuntu 22.04 on local arm64/Apple Silicon):",
"proposals": [
"debian13",
"debian12",
"debian11",
"ubuntu24.04",
"ubuntu22.04"
],
"default": "debian12"
"default": "debian13"
},
"reinstallCmakeVersionFromSource": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion src/java-postgres/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/java:1-${templateOption:imageVariant}
FROM mcr.microsoft.com/devcontainers/java:3-${templateOption:imageVariant}

ARG INSTALL_MAVEN="${templateOption:installMaven}"
ARG MAVEN_VERSION=""
Expand Down
29 changes: 22 additions & 7 deletions src/java-postgres/.devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

volumes:
postgres-data:

Expand All @@ -14,16 +12,21 @@ services:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_HOSTNAME: postgresdb
POSTGRES_HOSTNAME: db

volumes:
- ../..:/workspaces:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Use proper Docker networking instead of network_mode: service:db
# to ensure reliable DNS resolution in all environments
depends_on:
db:
condition: service_healthy
networks:
- app-network

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
Expand All @@ -32,13 +35,25 @@ services:
container_name: postgresdb
image: postgres:latest
restart: unless-stopped
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres-data:/var/lib/postgresql
environment:
# NOTE: POSTGRES_DB/USER/PASSWORD should match values in app container
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres

# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
# (Adding the "ports" property to this file will not forward from a Codespace.)

networks:
app-network:
driver: bridge
9 changes: 2 additions & 7 deletions src/java-postgres/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This template references an image that was [pre-built](https://containers.dev/im

## Using this template

This template creates two containers, one for Java and one for PostgreSQL. You will be connected to the Java container, and from within that container the PostgreSQL container will be available on **`localhost`** port 5432. The default database is named `postgres` with a user of `postgres` whose password is `postgres`, and if desired this may be changed in `.devcontainer/docker-compose.yml`. Data is stored in a volume named `postgres-data`.
This template creates two containers, one for Java and one for PostgreSQL. You will be connected to the Java container, and from within that container the PostgreSQL container will be available on the hostname **`db`** port 5432. The default database is named `postgres` with a user of `postgres` whose password is `postgres`, and if desired this may be changed in `.devcontainer/docker-compose.yml`. Data is stored in a volume named `postgres-data`.

While the template itself works unmodified, it uses the `mcr.microsoft.com/devcontainers/java` image which includes `git`, a non-root `vscode` user with `sudo` access, and a set of common dependencies and Java tools for development.

Expand All @@ -28,12 +28,7 @@ If needed, you can use `postCreateCommand` to run commands after the container i

### Adding another service

You can add other services to your `.devcontainer/docker-compose.yml` file [as described in Docker's documentation](https://docs.docker.com/compose/compose-file/#service-configuration-reference). However, if you want anything running in this service to be available in the container on localhost, or want to forward the service locally, be sure to add this line to the service config:

```yaml
# Runs the service on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
```
You can add other services to your `.devcontainer/docker-compose.yml` file [as described in Docker's documentation](https://docs.docker.com/compose/compose-file/#service-configuration-reference). For inter-service communication, attach new services to the `app-network` bridge network configured in the compose file.

### Using the forwardPorts property

Expand Down
18 changes: 10 additions & 8 deletions src/java-postgres/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "java-postgres",
"version": "4.0.2",
"version": "5.0.0",
"name": "Java & PostgreSQL",
"description": "Develop applications with Java and PostgreSQL. Includes a Java application container and PostgreSQL server.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/java-postgres",
Expand All @@ -9,18 +9,20 @@
"options": {
"imageVariant": {
"type": "string",
"description": "Java version (use -bookworm, or -bullseye variants on local arm64/Apple Silicon):",
"description": "Java version (use -trixie, or -bookworm variants on local arm64/Apple Silicon):",
"proposals": [
"25-trixie",
"21-trixie",
"17-trixie",
"11-trixie",
"8-trixie",
"25-bookworm",
"21-bookworm",
"17-bookworm",
"11-bookworm",
"8-bookworm",
"21-bullseye",
"17-bullseye",
"11-bullseye",
"8-bullseye"
"8-bookworm"
],
"default": "21-bullseye"
"default": "25-trixie"
},
"installMaven": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/java/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-${templateOption:imageVariant}",
"image": "mcr.microsoft.com/devcontainers/java:3-${templateOption:imageVariant}",

"features": {
"ghcr.io/devcontainers/features/java:1": {
Expand Down
18 changes: 10 additions & 8 deletions src/java/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "java",
"version": "4.0.2",
"version": "5.0.0",
"name": "Java",
"description": "Develop Java applications. Includes the JDK and Java extensions.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/java",
Expand All @@ -9,18 +9,20 @@
"options": {
"imageVariant": {
"type": "string",
"description": "Java version (use -bookworm, or -bullseye variants on local arm64/Apple Silicon):",
"description": "Java version (use -trixie, or -bookworm variants on local arm64/Apple Silicon):",
"proposals": [
"25-trixie",
"21-trixie",
"17-trixie",
"11-trixie",
"8-trixie",
"25-bookworm",
"21-bookworm",
"17-bookworm",
"11-bookworm",
"8-bookworm",
"21-bullseye",
"17-bullseye",
"11-bullseye",
"8-bullseye"
"8-bookworm"
],
"default": "21-bullseye"
"default": "25-trixie"
},
"installMaven": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/javascript-node-mongo/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:1-${templateOption:imageVariant}
FROM mcr.microsoft.com/devcontainers/javascript-node:4-${templateOption:imageVariant}

# Install MongoDB command line tools - though mongo-database-tools not available on arm64
ARG MONGO_TOOLS_VERSION=6.0
Expand Down
11 changes: 5 additions & 6 deletions src/javascript-node-mongo/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "javascript-node-mongo",
"version": "4.0.2",
"version": "5.0.0",
"name": "Node.js & Mongo DB",
"description": "Develop applications in Node.js and Mongo DB. Includes Node.js, eslint, and yarn in a container linked to a Mongo DB.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/javascript-node-mongo",
Expand All @@ -9,15 +9,14 @@
"options": {
"imageVariant": {
"type": "string",
"description": "Node.js version (use -bullseye variants on local arm64/Apple Silicon):",
"description": "Node.js version (use -bookworm or -bullseye variants on local arm64/Apple Silicon):",
"proposals": [
"24-bookworm",
"24-bullseye",
"22-bookworm",
"22-bullseye",
"20-bookworm",
"20-bullseye",
"18-bullseye"
"24-bullseye",
"22-bullseye",
"20-bullseye"
],
"default": "24-bookworm"
}
Expand Down
2 changes: 1 addition & 1 deletion src/javascript-node-postgres/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:1-${templateOption:imageVariant}
FROM mcr.microsoft.com/devcontainers/javascript-node:4-${templateOption:imageVariant}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand Down
27 changes: 21 additions & 6 deletions src/javascript-node-postgres/.devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: '3.8'
volumes:
postgres-data:

services:
app:
Expand All @@ -12,17 +13,30 @@ services:
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Use proper Docker networking instead of network_mode: service:db
# to ensure reliable DNS resolution in all environments
depends_on:
db:
condition: service_healthy
networks:
- app-network

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

db:
image: postgres:latest
restart: unless-stopped
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres-data:/var/lib/postgresql
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -31,5 +45,6 @@ services:
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

volumes:
postgres-data:
networks:
app-network:
driver: bridge
2 changes: 1 addition & 1 deletion src/javascript-node-postgres/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This template references an image that was [pre-built](https://containers.dev/im

## Using this template

This definition creates two containers, one for Node.js and one for PostgreSQL. You will be connected to the Node.js container, and from within that container the PostgreSQL container will be available on **`localhost`** port 5432. The default database is named `postgres` with a user of `postgres` whose password is `postgres`, and if desired this may be changed in `docker-compose.yml`. Data is stored in a volume named `postgres-data`.
This definition creates two containers, one for Node.js and one for PostgreSQL. You will be connected to the Node.js container, and from within that container the PostgreSQL container will be available on **`db`** port 5432. The default database is named `postgres` with a user of `postgres` whose password is `postgres`, and if desired this may be changed in `docker-compose.yml`. Data is stored in a volume named `postgres-data`.

While the definition itself works unmodified, it uses the `mcr.microsoft.com/devcontainers/javascript-node` image which includes `git`, `eslint`, `zsh`, [Oh My Zsh!](https://ohmyz.sh/), a non-root `vscode` user with `sudo` access, and a set of common dependencies for development.

Expand Down
18 changes: 9 additions & 9 deletions src/javascript-node-postgres/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "javascript-node-postgres",
"version": "4.0.2",
"version": "5.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",
Expand All @@ -9,19 +9,19 @@
"options": {
"imageVariant": {
"type": "string",
"description": "Node.js version (use -bookworm, -bullseye variants on local arm64/Apple Silicon):",
"description": "Node.js version (use -trixie, -bookworm, or -bullseye variants on local arm64/Apple Silicon):",
"proposals": [
"24-trixie",
"22-trixie",
"20-trixie",
"24-bookworm",
"24-bullseye",
"22-bookworm",
"22-bullseye",
"20-bookworm",
"20-bullseye",
"18-bookworm",
"20-bullseye",
"18-bullseye"
"24-bullseye",
"22-bullseye",
"20-bullseye"
],
"default": "24-bookworm"
"default": "24-trixie"
}
},
"platforms": [
Expand Down
2 changes: 1 addition & 1 deletion src/javascript-node/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:1-${templateOption:imageVariant}"
"image": "mcr.microsoft.com/devcontainers/javascript-node:4-${templateOption:imageVariant}"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
Loading