diff --git a/src/git/install.sh b/src/git/install.sh index 9e59814bf..4124fc80c 100755 --- a/src/git/install.sh +++ b/src/git/install.sh @@ -270,6 +270,12 @@ elif [ "${ADJUSTED_ID}" = "rhel" ]; then if ! type curl > /dev/null 2>&1; then check_packages curl fi + if ! type cmp > /dev/null 2>&1; then + check_packages diffutils + fi + if ! type awk > /dev/null 2>&1; then + check_packages gawk + fi if [ $ID = "mariner" ]; then check_packages glibc-devel kernel-headers binutils fi diff --git a/test/_global/scenarios.json b/test/_global/scenarios.json index 2228c7d6e..184f8e87b 100644 --- a/test/_global/scenarios.json +++ b/test/_global/scenarios.json @@ -1,6 +1,6 @@ { "all_the_clis": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "aws-cli": {}, "azure-cli": {}, @@ -8,7 +8,7 @@ } }, "node_java_rust": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "node": {}, "java": {}, diff --git a/test/common-utils/devcontainer-custom-home/Dockerfile b/test/common-utils/devcontainer-custom-home/Dockerfile index a94af4bc1..824e1e343 100644 --- a/test/common-utils/devcontainer-custom-home/Dockerfile +++ b/test/common-utils/devcontainer-custom-home/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:noble RUN groupadd customUser -g 30000 && \ useradd customUser -u 30000 -g 30000 --create-home --home-dir /customHome diff --git a/test/common-utils/devcontainer-info/Dockerfile b/test/common-utils/devcontainer-info/Dockerfile index 28247d907..07d7a1caf 100644 --- a/test/common-utils/devcontainer-info/Dockerfile +++ b/test/common-utils/devcontainer-info/Dockerfile @@ -1,3 +1,9 @@ -FROM ubuntu:focal +FROM ubuntu:noble COPY meta.env /usr/local/etc/dev-containers/meta.env + +RUN if id "ubuntu" &>/dev/null; then \ + echo "Deleting user 'ubuntu' for noble" && userdel -f -r ubuntu || echo "Failed to delete ubuntu user for noble"; \ + else \ + echo "User 'ubuntu' does not exist for noble"; \ + fi diff --git a/test/common-utils/noble.sh b/test/common-utils/noble.sh new file mode 100644 index 000000000..78ad146e3 --- /dev/null +++ b/test/common-utils/noble.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +. /etc/os-release +check "non-root user" test "$(whoami)" = "devcontainer" +check "distro" test "${VERSION_CODENAME}" = "noble" + +# Report result +reportResults + diff --git a/test/common-utils/scenarios.json b/test/common-utils/scenarios.json index 4ffbde1ac..5a8ec87cd 100644 --- a/test/common-utils/scenarios.json +++ b/test/common-utils/scenarios.json @@ -1,25 +1,18 @@ { - "bionic": { - "image": "ubuntu:bionic", - "remoteUser": "devcontainer", - "features": { - "common-utils": {} - } - }, - "focal": { - "image": "ubuntu:focal", + "jammy": { + "image": "ubuntu:jammy", "remoteUser": "devcontainer", "features": { "common-utils": {} } }, - "jammy": { - "image": "ubuntu:jammy", + "noble": { + "image": "ubuntu:noble", "remoteUser": "devcontainer", "features": { "common-utils": {} } - }, + }, "buster": { "image": "debian:buster", "remoteUser": "devcontainer", diff --git a/test/conda/scenarios.json b/test/conda/scenarios.json index 9cc2fc136..ef930a17c 100644 --- a/test/conda/scenarios.json +++ b/test/conda/scenarios.json @@ -1,6 +1,6 @@ { "install_conda": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "conda": { "version": "4.12.0", diff --git a/test/docker-in-docker/docker_specific_moby_buildx.sh b/test/docker-in-docker/docker_specific_moby_buildx.sh index 1ca2b20bd..b2d4610a1 100755 --- a/test/docker-in-docker/docker_specific_moby_buildx.sh +++ b/test/docker-in-docker/docker_specific_moby_buildx.sh @@ -5,7 +5,7 @@ set -e # Optional: Import test library source dev-container-features-test-lib # Definition specific tests -check "moby-buildx" bash -c "dpkg-query -W moby-buildx | grep -E '0.12.0'" +check "moby-buildx" bash -c "dpkg-query -W moby-buildx | grep -E '0.14.0'" check "docker-buildx" bash -c "docker buildx version" check "docker-buildx-path" bash -c "ls -la /usr/libexec/docker/cli-plugins/docker-buildx" diff --git a/test/docker-in-docker/scenarios.json b/test/docker-in-docker/scenarios.json index 57681b799..1587bda56 100644 --- a/test/docker-in-docker/scenarios.json +++ b/test/docker-in-docker/scenarios.json @@ -1,6 +1,6 @@ { "docker_build_fallback_compose": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "docker-in-docker": { "version": "latest", @@ -9,7 +9,7 @@ } }, "dockerIp6tablesDisabledTest": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "docker-in-docker": { "version": "27.0.3", @@ -56,7 +56,7 @@ "remoteUser": "node" }, "docker_build_2": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "docker-in-docker": { "version": "latest", @@ -106,7 +106,7 @@ } }, "docker_compose_v1": { - "image": "mcr.microsoft.com/devcontainers/base:focal", + "image": "mcr.microsoft.com/devcontainers/base:noble", "features": { "docker-in-docker": { "moby": true, @@ -116,7 +116,7 @@ } }, "docker_compose_v2": { - "image": "mcr.microsoft.com/devcontainers/base:focal", + "image": "mcr.microsoft.com/devcontainers/base:noble", "features": { "docker-in-docker": { "moby": true, @@ -126,7 +126,7 @@ } }, "docker_build_fallback_buildx": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "docker-in-docker": { "version": "latest", @@ -135,10 +135,10 @@ } }, "docker_specific_moby_buildx": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "docker-in-docker": { - "mobyBuildxVersion": "0.12.0" + "mobyBuildxVersion": "0.14.0" } } }, diff --git a/test/docker-outside-of-docker/docker_specific_moby_buildx.sh b/test/docker-outside-of-docker/docker_specific_moby_buildx.sh index 929fa6080..8428170e9 100755 --- a/test/docker-outside-of-docker/docker_specific_moby_buildx.sh +++ b/test/docker-outside-of-docker/docker_specific_moby_buildx.sh @@ -5,7 +5,7 @@ set -e # Optional: Import test library source dev-container-features-test-lib # Definition specific tests -check "moby-buildx" bash -c "dpkg-query -W moby-buildx | grep -E '0.12.0'" +check "moby-buildx" bash -c "dpkg-query -W moby-buildx | grep -E '0.14.0'" check "docker-buildx" bash -c "docker buildx version" check "docker-buildx-path" bash -c "ls -la /usr/libexec/docker/cli-plugins/docker-buildx" diff --git a/test/docker-outside-of-docker/scenarios.json b/test/docker-outside-of-docker/scenarios.json index 7d3301f12..7125b4715 100644 --- a/test/docker-outside-of-docker/scenarios.json +++ b/test/docker-outside-of-docker/scenarios.json @@ -1,6 +1,6 @@ { "docker_build_compose_fallback": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": false, @@ -10,7 +10,7 @@ "containerUser": "vscode" }, "docker_init_moby": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": true @@ -19,7 +19,7 @@ "containerUser": "vscode" }, "docker_init": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": false @@ -46,7 +46,7 @@ "containerUser": "vscode" }, "docker_build": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": false, @@ -56,7 +56,7 @@ "containerUser": "vscode" }, "docker_build_moby": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": true @@ -65,10 +65,10 @@ "containerUser": "vscode" }, "docker_build_no_buildx": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { - "version": "20", + "version": "26", "moby": false, "installDockerBuildx": false } @@ -76,10 +76,10 @@ "containerUser": "vscode" }, "docker_build_no_buildx_moby": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { - "version": "20", + "version": "26", "moby": true, "installDockerBuildx": false } @@ -87,7 +87,7 @@ "containerUser": "vscode" }, "docker_dash_compose_v1": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": false, @@ -97,7 +97,7 @@ "containerUser": "vscode" }, "docker_dash_compose_v1_moby": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": true, @@ -107,7 +107,7 @@ "containerUser": "vscode" }, "docker_dash_compose_v2": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": false, @@ -117,7 +117,7 @@ "containerUser": "vscode" }, "docker_dash_compose_v2_moby": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "moby": true, @@ -136,10 +136,10 @@ "remoteUser": "node" }, "docker_specific_moby_buildx": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "docker-outside-of-docker": { - "mobyBuildxVersion": "0.12.0" + "mobyBuildxVersion": "0.14.0" } } }, @@ -154,7 +154,7 @@ } }, "docker_not_install_compose_switch": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "dockerDashComposeVersion": "latest", @@ -164,7 +164,7 @@ "containerUser": "vscode" }, "docker_install_compose_switch": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "features": { "docker-outside-of-docker": { "dockerDashComposeVersion": "latest", diff --git a/test/git/install_git_from_ppa_jammy.sh b/test/git/install_git_from_ppa_jammy.sh new file mode 100644 index 000000000..45e4a20bc --- /dev/null +++ b/test/git/install_git_from_ppa_jammy.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "version" git --version + +cd /tmp && git clone https://github.com/devcontainers/feature-starter.git +cd feature-starter +check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'" + +# Report result +reportResults + diff --git a/test/git/install_git_from_src_noble.sh b/test/git/install_git_from_src_noble.sh new file mode 100644 index 000000000..337226fdc --- /dev/null +++ b/test/git/install_git_from_src_noble.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "version" git --version +check "gettext" dpkg-query -l gettext + +cd /tmp && git clone https://github.com/devcontainers/feature-starter.git +cd feature-starter +check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'" + +# Report result +reportResults + diff --git a/test/git/scenarios.json b/test/git/scenarios.json index 0f5d522b3..7feff6564 100644 --- a/test/git/scenarios.json +++ b/test/git/scenarios.json @@ -1,6 +1,6 @@ { "install_git_from_src": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "git": { "version": "latest", @@ -26,8 +26,8 @@ } } }, - "install_git_from_ppa_bionic": { - "image": "ubuntu:bionic", + "install_git_from_ppa_jammy": { + "image": "ubuntu:jammy", "features": { "git": { "version": "latest", @@ -35,8 +35,8 @@ } } }, - "install_git_from_src_bionic": { - "image": "ubuntu:bionic", + "install_git_from_src_noble": { + "image": "ubuntu:noble", "features": { "git": { "version": "latest", @@ -53,15 +53,6 @@ } } }, - "install_git_from_src_buster": { - "image": "debian:buster", - "features": { - "git": { - "version": "latest", - "ppa": "false" - } - } - }, "install_git_from_src_centos-7": { "image": "centos:centos7", "features": { diff --git a/test/github-cli/scenarios.json b/test/github-cli/scenarios.json index d41019aeb..ea6eb09d1 100644 --- a/test/github-cli/scenarios.json +++ b/test/github-cli/scenarios.json @@ -1,6 +1,6 @@ { "install_git_cli_from_release": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "github-cli": { "version": "latest", diff --git a/test/java/scenarios.json b/test/java/scenarios.json index f28fceb41..0441f0aa6 100644 --- a/test/java/scenarios.json +++ b/test/java/scenarios.json @@ -1,6 +1,6 @@ { "install_from_non_default_distro": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "21", @@ -9,7 +9,7 @@ } }, "install_latest_version": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "latest" @@ -17,7 +17,7 @@ } }, "install_lts_version": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "lts" @@ -25,7 +25,7 @@ } }, "install_additional_java": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "11", @@ -34,7 +34,7 @@ } }, "install_ant_and_gradle_and_maven_and_groovy_for_user": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "remoteUser": "vscode", "features": { "common-utils": { @@ -50,7 +50,7 @@ } }, "install_ant_and_gradle_and_maven_and_groovy": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "latest", @@ -62,7 +62,7 @@ } }, "install_ant_and_gradle_and_maven_and_groovy_with_specific_version": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "latest", @@ -78,7 +78,7 @@ } }, "install_non_conventional_version": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "java": { "version": "21", diff --git a/test/oryx/scenarios.json b/test/oryx/scenarios.json index d7a70f319..4b3643590 100644 --- a/test/oryx/scenarios.json +++ b/test/oryx/scenarios.json @@ -1,6 +1,6 @@ { "install_dotnet_and_oryx": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "dotnet": { "version": "8.0", @@ -11,7 +11,7 @@ } }, "install_older_dotnet_and_oryx": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "dotnet": { "version": "7.0" @@ -20,7 +20,7 @@ } }, "install_prev_dotnet_and_oryx": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "dotnet": { "version": "6.0" @@ -29,7 +29,7 @@ } }, "test_python_project": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "python": { "version": "3.10.4", diff --git a/test/php/install_additional_php.sh b/test/php/install_additional_php.sh index f22315a61..c1c085b5c 100644 --- a/test/php/install_additional_php.sh +++ b/test/php/install_additional_php.sh @@ -5,9 +5,9 @@ set -e # Optional: Import test library source dev-container-features-test-lib -check "php version 8.1.4 installed as default" php --version | grep 8.1.4 -check "php version 8.0.17 installed" ls -l /usr/local/php | grep 8.0.17 -check "php version 8.0.3 installed" ls -l /usr/local/php | grep 8.0.3 +check "php version 8.4.2 installed as default" php --version | grep 8.4.2 +check "php version 8.3.14 installed" ls -l /usr/local/php | grep 8.3.14 +check "php version 8.2.27 installed" ls -l /usr/local/php | grep 8.2.27 check "composer-version" composer --version diff --git a/test/php/scenarios.json b/test/php/scenarios.json index e53bb67ce..8aa25cbff 100644 --- a/test/php/scenarios.json +++ b/test/php/scenarios.json @@ -1,15 +1,15 @@ { "install_additional_php": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "php": { - "version": "8.1.4", - "additionalVersions": "8.0.17,8.0.3" + "version": "8.4.2", + "additionalVersions": "8.3.14,8.2.27" } } }, "install_php_8": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "php": { "version": "8" @@ -17,7 +17,7 @@ } }, "install_php_8_2": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "php": { "version": "8.2" @@ -34,7 +34,7 @@ } }, "test_php_fallback": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "php": { "version": "latest" diff --git a/test/python/scenarios.json b/test/python/scenarios.json index 9dc37e16c..a489ee8e6 100644 --- a/test/python/scenarios.json +++ b/test/python/scenarios.json @@ -40,7 +40,7 @@ } }, "install_additional_python": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "python": { "version": "3.11", @@ -58,7 +58,7 @@ } }, "install_jupyterlab": { - "image": "mcr.microsoft.com/devcontainers/base:focal", + "image": "mcr.microsoft.com/devcontainers/base:noble", "remoteUser": "vscode", "features": { "python": { @@ -83,7 +83,7 @@ } }, "install_additional_jupyterlab": { - "image": "mcr.microsoft.com/devcontainers/base:focal", + "image": "mcr.microsoft.com/devcontainers/base:noble", "remoteUser": "vscode", "features": { "python": { @@ -155,7 +155,7 @@ } }, "install_jupyterlab_ubuntu": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "python": { "version": "3.11", @@ -239,7 +239,7 @@ } }, "install_python_shared_lib_deb": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "python": { "version": "3.11", @@ -257,7 +257,7 @@ } }, "update_alternatives_switchable_versions": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "python": { "version": "3.11", diff --git a/test/ruby/scenarios.json b/test/ruby/scenarios.json index dd59d30fb..7a13f7004 100644 --- a/test/ruby/scenarios.json +++ b/test/ruby/scenarios.json @@ -1,6 +1,6 @@ { "install_additional_ruby": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "ruby": { "version": "3.4.2", diff --git a/test/rust/scenarios.json b/test/rust/scenarios.json index c3466b29b..83df710fb 100644 --- a/test/rust/scenarios.json +++ b/test/rust/scenarios.json @@ -1,6 +1,6 @@ { "rust_at_pinned_version": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "rust": { "version": "1.64.0" @@ -8,7 +8,7 @@ } }, "rust_with_target": { - "image": "ubuntu:focal", + "image": "ubuntu:noble", "features": { "rust": { "version": "latest",