Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(docker): upgrade base image to ubuntu 24.04 #99

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on: [push, pull_request]

jobs:
lint-commitlint:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -36,7 +36,7 @@ jobs:
./run-tests.sh --check-commitlint ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.number }}
lint-shellcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -47,15 +47,15 @@ jobs:
./run-tests.sh --check-shellcheck
lint-black:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Check Python code formatting
run: |
Expand All @@ -64,15 +64,15 @@ jobs:
./run-tests.sh --check-black
lint-flake8:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Check compliance with pep8, pyflakes and circular complexity
run: |
Expand All @@ -81,15 +81,15 @@ jobs:
./run-tests.sh --check-flake8
lint-pydocstyle:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Check compliance with Python docstring conventions
run: |
Expand All @@ -98,15 +98,15 @@ jobs:
./run-tests.sh --check-pydocstyle
lint-check-manifest:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Check Python manifest completeness
run: |
Expand All @@ -115,15 +115,15 @@ jobs:
./run-tests.sh --check-manifest
docs-sphinx:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Install system dependencies
run: |
Expand All @@ -134,35 +134,35 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install python3-dev graphviz libgraphviz-dev pkg-config
sudo apt-get install python3.12-dev graphviz libgraphviz-dev pkg-config uuid-dev
- name: Install Python dependencies
run: |
pip install --upgrade pip 'setuptools<65.6' py wheel
pip install --upgrade pip 'setuptools' py wheel
pip install -e .[all]
- name: Run Sphinx documentation with doctests
run: ./run-tests.sh --check-sphinx

python-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install python3-dev graphviz libgraphviz-dev pkg-config
sudo apt-get install python3.12-dev graphviz libgraphviz-dev pkg-config uuid-dev
- name: Install Python dependencies
run: |
pip install --upgrade pip 'setuptools<65.6' py
pip install --upgrade pip 'setuptools' py
pip install twine wheel
pip install -e .[all]
Expand All @@ -176,7 +176,7 @@ jobs:
files: coverage.xml

lint-dockerfile:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -185,7 +185,7 @@ jobs:
run: ./run-tests.sh --check-dockerfile

docker-build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -194,7 +194,7 @@ jobs:
run: ./run-tests.sh --check-docker-build

release-docker:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: >
vars.RELEASE_DOCKER == 'true' &&
github.event_name == 'push' &&
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.8"
python: "3.12"

sphinx:
configuration: docs/conf.py
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ The list of contributors in alphabetical order:
- [Marco Donadoni](https://orcid.org/0000-0003-2922-5505)
- [Marco Vidal](https://orcid.org/0000-0002-9363-4971)
- [Sinclert Perez](https://www.linkedin.com/in/sinclert)
- [Stavros Moiras](https://orcid.org/0009-0005-4331-096X)
- [Tibor Simko](https://orcid.org/0000-0001-7202-5803)
- [Vladyslav Moisieienkov](https://orcid.org/0000-0001-9717-0775)
36 changes: 22 additions & 14 deletions Dockerfile
wirespecter marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
# under the terms of the MIT License; see LICENSE file for more details.

# Use Ubuntu LTS base image
FROM docker.io/library/ubuntu:20.04
FROM docker.io/library/ubuntu:24.04

# Recognise target architecture
ARG TARGETARCH

# Use default answers in installation commands
ENV DEBIAN_FRONTEND=noninteractive

# Use distutils provided by the standard Python library instead of the vendored one in
# setuptools, so that editable installations are stored in the right directory.
# See https://github.com/pypa/setuptools/issues/3301
ENV SETUPTOOLS_USE_DISTUTILS=stdlib
# Allow pip to install packages in the system site-packages dir
ENV PIP_BREAK_SYSTEM_PACKAGES=true

# Prepare list of Python dependencies
COPY requirements.txt /code/
Expand All @@ -29,20 +27,21 @@ RUN apt-get update -y && \
curl \
g++ \
gcc \
git \
gnupg2 \
graphviz \
graphviz-dev \
imagemagick \
krb5-config \
krb5-user \
libauthen-krb5-perl \
libauthen-krb5-simple-perl \
libkrb5-dev \
libssl-dev \
make \
pkg-config \
python3-dev \
python3.12-dev \
python3-pip \
python3.8 \
python3.12 \
wirespecter marked this conversation as resolved.
Show resolved Hide resolved
uuid-dev \
vim-tiny && \
# Install xrootd
Expand All @@ -60,17 +59,18 @@ RUN apt-get update -y && \
libxrootd-client-dev \
xrootd-client) \
fi && \
pip install --no-cache-dir --upgrade pip 'setuptools<71' && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir -r /code/requirements.txt && \
apt-get remove -y \
cmake \
g++ \
gcc \
git \
graphviz-dev \
libssl-dev \
make \
pkg-config \
python3-dev \
python3.12-dev \
uuid-dev && \
apt-get autoremove -y && \
apt-get clean && \
Expand All @@ -82,7 +82,7 @@ COPY . /code

# Add magick wrapper command to simulate ImageMagick v7 that is necessary by Snakemake
# to produce thumbnails in generated reports. The wrapper simply passes conversion
# requests to ImageMagick v6 available on Ubuntu 20.04.
# requests to ImageMagick v6 available on Ubuntu 24.04.
COPY scripts/magick-wrapper.sh /usr/local/bin/magick
RUN chmod +x /usr/local/bin/magick

Expand All @@ -92,14 +92,22 @@ ARG DEBUG=0
RUN if [ "${DEBUG}" -gt 0 ]; then pip install --no-cache-dir -e ".[debug,xrootd]"; else pip install --no-cache-dir ".[xrootd]"; fi;

# Are we building with locally-checked-out shared modules?
# hadolint ignore=DL3013
RUN if test -e modules/reana-commons; then \
# hadolint ignore=DL3008,DL3013
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
git && \
if test -e modules/reana-commons; then \
if [ "${DEBUG}" -gt 0 ]; then \
pip install --no-cache-dir -e "modules/reana-commons[snakemake_reports]" --upgrade; \
else \
pip install --no-cache-dir "modules/reana-commons[snakemake_reports]" --upgrade; \
fi \
fi
fi && \
apt-get remove -y \
git && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Check for any broken Python dependencies
RUN pip check
Expand Down
Loading
Loading