Skip to content

Commit

Permalink
build(docker): upgraded docker image to ubuntu 24.04 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
wirespecter committed Jul 16, 2024
1 parent 419bed6 commit 3bb7b7e
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 66 deletions.
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<70.3' 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<70.3' 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)
50 changes: 39 additions & 11 deletions Dockerfile
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 @@ -35,14 +33,14 @@ RUN apt-get update -y && \
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 \
uuid-dev \
vim-tiny && \
# Install xrootd
Expand All @@ -60,7 +58,7 @@ RUN apt-get update -y && \
libxrootd-client-dev \
xrootd-client) \
fi && \
pip install --no-cache-dir --upgrade pip setuptools && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir -r /code/requirements.txt && \
apt-get remove -y \
cmake \
Expand All @@ -70,7 +68,7 @@ RUN apt-get update -y && \
libssl-dev \
make \
pkg-config \
python3-dev \
python3.12-dev \
uuid-dev && \
apt-get autoremove -y && \
apt-get clean && \
Expand All @@ -89,7 +87,37 @@ RUN chmod +x /usr/local/bin/magick
# Are we debugging?
ARG DEBUG=0
# hadolint ignore=DL3013
RUN if [ "${DEBUG}" -gt 0 ]; then pip install --no-cache-dir -e ".[debug,xrootd]"; else pip install --no-cache-dir ".[xrootd]"; fi;
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
cmake \
curl \
g++ \
gcc \
krb5-config \
krb5-user \
libauthen-krb5-simple-perl \
libkrb5-dev \
libssl-dev \
make \
pkg-config \
python3.12-dev \
python3-pip \
python3.12 \
uuid-dev && \
if [ "${DEBUG}" -gt 0 ]; then pip install --no-cache-dir -e ".[debug,xrootd]"; else pip install --no-cache-dir ".[xrootd]"; fi; \
apt-get remove -y \
cmake \
g++ \
gcc \
graphviz-dev \
libssl-dev \
make \
pkg-config \
python3.12-dev \
uuid-dev && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Are we building with locally-checked-out shared modules?
# hadolint ignore=DL3013
Expand Down
Loading

0 comments on commit 3bb7b7e

Please sign in to comment.