From 4d356fa1586f74bd39c56c4789f383686f1d7ed9 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 18 Jun 2024 10:42:09 +0200 Subject: [PATCH] Add support for Ubuntu 24.04 LTS (#207) Required by https://github.com/readthedocs/readthedocs.org/issues/11072 --- .circleci/config.yml | 6 +++--- CONTRIBUTING.rst | 4 ++-- Dockerfile | 4 ++-- README.rst | 8 ++++++-- tests/constants.py | 2 +- tests/test_versions.py | 4 ++-- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7283957..f902b2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: # DOCKER_IMAGES full names come from the Docker Hub name: Download Docker images command: | - DOCKER_IMAGES="ubuntu-22.04-2024.01.29 ubuntu-20.04-2024.01.29" + DOCKER_IMAGES="ubuntu-24.04-2024.06.17 ubuntu-22.04-2024.01.29 ubuntu-20.04-2024.01.29" for docker_image in $DOCKER_IMAGES do docker pull readthedocs/build:$docker_image @@ -35,7 +35,7 @@ jobs: command: | declare -A TOOLS - OS_NAMES="ubuntu-22.04 ubuntu-20.04" + OS_NAMES="ubuntu-24.04 ubuntu-22.04 ubuntu-20.04" TOOLS=( ["python"]="2.7.18 3.6.15 3.7.17 3.8.19 3.9.19 3.10.14 3.11.9 3.12.3 miniconda3-4.7.12 miniconda3-3.12-24.1.2-0 mambaforge-4.10.3-10 mambaforge-22.9.0-3 mambaforge-23.11.0-0" ["nodejs"]="14.20.1 16.18.1 18.16.1 19.0.1 20.14.0" @@ -94,7 +94,7 @@ jobs: pipenv install - run: name: Build Docker image - command: docker build -t readthedocs/build:ubuntu-22.04 . + command: docker build -t readthedocs/build:ubuntu-24.04 . - run: name: Run tests command: pipenv run pytest diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 8dbf58f..8ed749a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -18,7 +18,7 @@ If you'd like to add a feature to any of the images, you'll need to verify the image works locally first. After making changes to the ``Dockerfile``, you can build your image with:: - docker build -t readthedocs/build:ubuntu-20.04 . + docker build -t readthedocs/build:ubuntu-24.04 . This will take quite a long time, mostly due to LaTeX dependencies. The resulting image will be around 5GB. @@ -26,7 +26,7 @@ resulting image will be around 5GB. Once your image is built, you can test your image locally by running a shell in a container using your new image:: - docker run --rm -t -i readthedocs/build:ubuntu-20.04 /bin/bash + docker run --rm -t -i readthedocs/build:ubuntu-24.04 /bin/bash This will put you into the root path in the container, as the ``docs`` user. From here you can head to your home path (``cd ~docs``) and run normal diff --git a/Dockerfile b/Dockerfile index 9b913e9..b24e4c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Read the Docs - Environment base -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL mantainer="Read the Docs " -LABEL version="ubuntu-22.04-2024.01.29" +LABEL version="ubuntu-24.04-2024.06.17" ENV DEBIAN_FRONTEND noninteractive ENV LANG C.UTF-8 diff --git a/README.rst b/README.rst index 6af4c79..25f2b07 100644 --- a/README.rst +++ b/README.rst @@ -16,6 +16,10 @@ repository: Ubuntu 22.04 supporting multiple versions of Python, PyPy, conda, mamba, nodejs, rust and go. Available for public usage as ``build.os: ubuntu-22.04`` +`readthedocs/build:ubuntu-24.04-YYYY.MM.DD` + Ubuntu 24.04 supporting multiple versions of Python, PyPy, conda, mamba, nodejs, rust and go. + Available for public usage as ``build.os: ubuntu-24.04`` + Note that these images only contains the basic dependencies: - ``asdf`` CLI manager to install the languages versions @@ -35,7 +39,7 @@ Usage To use the pre-built images, you can pull from Docker Hub: - docker pull readthedocs/build:ubuntu-22.04-YYYY.MM.DD + docker pull readthedocs/build:ubuntu-24.04-YYYY.MM.DD .. note:: @@ -44,7 +48,7 @@ To use the pre-built images, you can pull from Docker Hub: You can also compile these images locally: - docker build -t readthedocs/build:ubuntu-22.04-YYYY.MM.DD . + docker build -t readthedocs/build:ubuntu-24.04-YYYY.MM.DD . See `CONTRIBUTING`_ for more information on building and testing. diff --git a/tests/constants.py b/tests/constants.py index 981ddff..dad5633 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -1 +1 @@ -DOCKER_IMAGE = 'readthedocs/build:ubuntu-22.04' +DOCKER_IMAGE = 'readthedocs/build:ubuntu-24.04' diff --git a/tests/test_versions.py b/tests/test_versions.py index b649af6..885a7fa 100644 --- a/tests/test_versions.py +++ b/tests/test_versions.py @@ -9,9 +9,9 @@ [ ('asdf version', 'v0.14.0-ccdd47d'), ('asdf plugin list', '\n'.join(['golang', 'nodejs', 'python', 'ruby', 'rust'])), - ('git --version', 'git version 2.34.1'), + ('git --version', 'git version 2.43.0'), ] ) -def test_command_versions_image_ubuntu22(command, expected_output): +def test_command_versions_image_ubuntu24(command, expected_output): cmd_output = run_command_in_container(DOCKER_IMAGE, command) assert cmd_output == expected_output