From 920652436ce34cf40dddf475dfcb631d3be930b3 Mon Sep 17 00:00:00 2001 From: Yeikel Santana Date: Sun, 10 May 2026 01:16:54 -0400 Subject: [PATCH] Upgrade to Ubuntu 26.04 Upgrades from Ubuntu 24.04 (noble) to Ubuntu 26.04 (resolute) --- .devcontainer/Dockerfile | 8 +++----- .devcontainer/devcontainer.json | 7 +++---- Dockerfile.updater-core | 23 ++--------------------- swift/Dockerfile | 18 ++++++++++++++---- 4 files changed, 22 insertions(+), 34 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 828de1fbe7e..0213dc058f1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,6 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile - -# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04 -ARG VARIANT="jammy" -FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} +# [Choice] Ubuntu version: ubuntu26.04, ubuntu24.04, ubuntu22.04 +ARG VARIANT="ubuntu26.04" +FROM mcr.microsoft.com/devcontainers/base:${VARIANT} # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c7bf79722ab..d3315702e74 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,13 +1,12 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu +// https://github.com/devcontainers/images/tree/main/src/base-ubuntu { "name": "Ubuntu", "build": { "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04 - // Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon. + // Update 'VARIANT' to pick an Ubuntu version: ubuntu26.04, ubuntu24.04, ubuntu22.04 "args": { - "VARIANT": "ubuntu-22.04" + "VARIANT": "ubuntu26.04" } }, // Use 'forwardPorts' to make a list of ports inside the container available locally. diff --git a/Dockerfile.updater-core b/Dockerfile.updater-core index cd62e5c8559..4dc23f35b4d 100644 --- a/Dockerfile.updater-core +++ b/Dockerfile.updater-core @@ -1,5 +1,5 @@ # syntax=docker.io/docker/dockerfile:1.20 -FROM docker.io/library/ubuntu:24.04 +FROM docker.io/library/ubuntu:26.04 ARG TARGETARCH @@ -61,25 +61,8 @@ EOF RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends \ - # needed to run add-apt-repository - software-properties-common \ - # Used to download the git-lfs GPG key as well as dev dependencies for CI + # Used for dev dependencies for CI curl \ - # Add git core ppa to get a more recent git version than the one provided by ubuntu - && add-apt-repository -y ppa:git-core/ppa \ - # Install the git-lfs mirror. See https://github.com/git-lfs/git-lfs/blob/main/INSTALLING.md - # We need this because the version of git-lfs provided by Ubuntu is outdated - # apt-transport-https is a temporary dependency to install the git-lfs apt source - && apt-get install -y --no-install-recommends apt-transport-https \ - && mkdir -p /etc/apt/keyrings \ - && curl -fsSL 'https://packagecloud.io/github/git-lfs/gpgkey' | gpg --dearmor > /etc/apt/keyrings/github_git-lfs-archive-keyring.gpg \ - && release=$( . /etc/os-release && echo "$VERSION_CODENAME" ) \ - && echo "deb [signed-by=/etc/apt/keyrings/github_git-lfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/ubuntu/ $release main" \ - > /etc/apt/sources.list.d/github_git-lfs.list \ - && echo "deb-src [signed-by=/etc/apt/keyrings/github_git-lfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/ubuntu/ $release main" \ - >> /etc/apt/sources.list.d/github_git-lfs.list \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ # dev dependencies for CI build-essential \ libgmp-dev \ @@ -104,8 +87,6 @@ RUN apt-get update \ libyaml-dev \ locales \ && locale-gen en_US.UTF-8 \ - # No longer needed post git-core ppa addition and git-lfs install - && apt purge software-properties-common apt-transport-https -y && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* ARG USER_UID=1000 diff --git a/swift/Dockerfile b/swift/Dockerfile index 0fd2e5fb08a..580028f189e 100644 --- a/swift/Dockerfile +++ b/swift/Dockerfile @@ -5,13 +5,19 @@ ARG TARGETARCH ENV PATH="${PATH}:/opt/swift/usr/bin" # OS dependencies -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ +# NOTE: Exclude i386 architecture to prevent apt from trying to install i386 variants +# that are unavailable in Ubuntu 26.04 (e.g., libxml2:i386). This doesn't impact arm64 builds. +RUN < /etc/apt/preferences.d/exclude-i386 + apt-get update + apt-get install -y --no-install-recommends \ binutils \ libc6-dev \ libcurl4-openssl-dev \ libedit2 \ libgcc-13-dev \ + libncurses6 \ libpython3-dev \ libsqlite3-0 \ libstdc++-13-dev \ @@ -20,8 +26,9 @@ RUN apt-get update \ libz3-dev \ pkg-config \ tzdata \ - uuid-dev \ - && rm -rf /var/lib/apt/lists/* + uuid-dev + rm -rf /var/lib/apt/lists/* +EOF USER dependabot @@ -29,6 +36,9 @@ USER dependabot # https://github.com/apple/swift-org-website/blob/main/_data/builds/swift_releases.yml ARG SWIFT_VERSION=6.3.1 ARG SWIFT_UBUNTU_VERSION=ubuntu24.04 +# NOTE: Pinned to Ubuntu 24.04 because Swift builds are not yet available for Ubuntu 26.04. +# See: https://github.com/swiftlang/swift/issues/88994 +# To check if builds are available: curl -L -o /dev/null -w "%{http_code}" https://download.swift.org/swift-6.2.3-release/ubuntu2604/swift-6.2.3-RELEASE/swift-6.2.3-RELEASE-ubuntu26.04.tar.gz RUN if [ "$TARGETARCH" = "arm64" ]; then SWIFT_UBUNTU_VERSION="${SWIFT_UBUNTU_VERSION}-aarch64"; fi \ && SWIFT_SHORT_UBUNTU_VERSION=$(echo $SWIFT_UBUNTU_VERSION | tr -d .) \