Skip to content

Commit 7cb5857

Browse files
Support Ubuntu 24.04 (noble) (#1036)
* Support Ubuntu 24.04 (noble) * Bump major version * Updates to lock file * Remove pinned "userUid" & "userGid" * fix build ; remove noble as latest `ubuntu` * Update --update-remote-user-uid-default off * revert --update-remote-user-uid-default * update README
1 parent 9574fab commit 7cb5857

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

src/base-ubuntu/.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# [Choice] Ubuntu version (use jammy on local arm64/Apple Silicon): jammy, focal
2-
ARG VARIANT="jammy"
1+
ARG VARIANT="noble"
32
FROM buildpack-deps:${VARIANT}-curl
43

54
LABEL dev.containers.features="common"

src/base-ubuntu/.devcontainer/devcontainer-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"features": {
33
"ghcr.io/devcontainers/features/common-utils:2": {
4-
"version": "2.4.2",
5-
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:bebfdcd6097a35506bf0f064a31e52ad4205467d9d7a226a688f51b851c88b65",
6-
"integrity": "sha256:bebfdcd6097a35506bf0f064a31e52ad4205467d9d7a226a688f51b851c88b65"
4+
"version": "2.4.3",
5+
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:e9e1d402031416ed5fc500f242c27ffa1043a27b5ba612e6596ea62503c8ae70",
6+
"integrity": "sha256:e9e1d402031416ed5fc500f242c27ffa1043a27b5ba612e6596ea62503c8ae70"
77
},
88
"ghcr.io/devcontainers/features/git:1": {
99
"version": "1.2.0",

src/base-ubuntu/.devcontainer/devcontainer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"ghcr.io/devcontainers/features/common-utils:2": {
88
"installZsh": "true",
99
"username": "vscode",
10-
"userUid": "1000",
11-
"userGid": "1000",
1210
"upgradePackages": "true"
1311
},
1412
"ghcr.io/devcontainers/features/git:1": {

src/base-ubuntu/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
| *Categories* | Core, Other |
1010
| *Image type* | Dockerfile |
1111
| *Published images* | mcr.microsoft.com/devcontainers/base:ubuntu |
12-
| *Available image variants* | ubuntu-22.04 / jammy, ubuntu-20.04 / focal ([full list](https://mcr.microsoft.com/v2/devcontainers/base/tags/list)) |
13-
| *Published image architecture(s)* | x86-64, aarch64/arm64 for `ubuntu-22.04` (`jammy`) variant |
12+
| *Available image variants* | ubuntu-24.04 / noble, ubuntu-22.04 / jammy, ubuntu-20.04 / focal ([full list](https://mcr.microsoft.com/v2/devcontainers/base/tags/list)) |
13+
| *Published image architecture(s)* | x86-64, aarch64/arm64 for `ubuntu-22.04` (`jammy`) and `ubuntu-24.04` (`noble`) variants |
1414
| *Container host OS support* | Linux, macOS, Windows |
1515
| *Container OS* | Ubuntu |
1616
| *Languages, platforms* | Any |
@@ -22,6 +22,7 @@ See **[history](history)** for information on the contents of published images.
2222
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.
2323

2424
- `mcr.microsoft.com/devcontainers/base:ubuntu` (latest LTS release)
25+
- `mcr.microsoft.com/devcontainers/base:ubuntu-24.04` (or `noble`)
2526
- `mcr.microsoft.com/devcontainers/base:ubuntu-22.04` (or `jammy`)
2627
- `mcr.microsoft.com/devcontainers/base:ubuntu-20.04` (or `focal`)
2728

src/base-ubuntu/manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{
22
"version": "1.0.23",
33
"variants": [
4+
"noble",
45
"jammy",
56
"focal"
67
],
78
"build": {
89
"latest": false,
910
"rootDistro": "debian",
1011
"architectures": {
12+
"noble": [
13+
"linux/amd64",
14+
"linux/arm64"
15+
],
1116
"jammy": [
1217
"linux/amd64",
1318
"linux/arm64"
@@ -20,6 +25,10 @@
2025
"base:${VERSION}-${VARIANT}"
2126
],
2227
"variantTags": {
28+
"noble": [
29+
"base:${VERSION}-ubuntu-24.04",
30+
"base:${VERSION}-ubuntu24.04"
31+
],
2332
"jammy": [
2433
"base:${VERSION}-ubuntu-22.04",
2534
"base:${VERSION}-ubuntu22.04",

src/base-ubuntu/test-project/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ check-version-ge "git-requirement" "${git_version}" "git version 2.40.1"
1717
check "set-git-config-user-name" sh -c "sudo git config --system user.name devcontainers"
1818
check "gitconfig-file-location" sh -c "ls /etc/gitconfig"
1919
check "gitconfig-contains-name" sh -c "cat /etc/gitconfig | grep 'name = devcontainers'"
20-
2120
check "usr-local-etc-config-does-not-exist" test ! -f "/usr/local/etc/gitconfig"
2221

22+
check "uid" bash -c "id -u vscode | grep 1001"
23+
2324
# Report result
2425
reportResults

0 commit comments

Comments
 (0)