Skip to content

Commit

Permalink
Add support for Ubuntu 24.04 LTS (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos authored Jun 18, 2024
1 parent a11cdea commit 4d356fa
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ 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.

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
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Read the Docs - Environment base
FROM ubuntu:22.04
FROM ubuntu:24.04
LABEL mantainer="Read the Docs <[email protected]>"
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
Expand Down
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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::

Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tests/constants.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DOCKER_IMAGE = 'readthedocs/build:ubuntu-22.04'
DOCKER_IMAGE = 'readthedocs/build:ubuntu-24.04'
4 changes: 2 additions & 2 deletions tests/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4d356fa

Please sign in to comment.