From 2de8023e8b0b274c43c10e5f6b6880794b3f787e Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 29 May 2024 18:08:35 +0200 Subject: [PATCH] [kiwix-build] Switch from bionic to manylinux image --- .github/workflows/kiwix-build_ci.yml | 2 +- kiwix-build_ci/bionic_builder.dockerfile | 27 -------------------- kiwix-build_ci/manylinux_builder.dockerfile | 28 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 28 deletions(-) delete mode 100644 kiwix-build_ci/bionic_builder.dockerfile create mode 100644 kiwix-build_ci/manylinux_builder.dockerfile diff --git a/.github/workflows/kiwix-build_ci.yml b/.github/workflows/kiwix-build_ci.yml index 9c369535..d80b9b56 100644 --- a/.github/workflows/kiwix-build_ci.yml +++ b/.github/workflows/kiwix-build_ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - variant: [f35, focal, bionic, alpine, noble] + variant: [f35, focal, manylinux, alpine, noble] runs-on: ubuntu-22.04 steps: diff --git a/kiwix-build_ci/bionic_builder.dockerfile b/kiwix-build_ci/bionic_builder.dockerfile deleted file mode 100644 index d5380890..00000000 --- a/kiwix-build_ci/bionic_builder.dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ubuntu:bionic -LABEL org.opencontainers.image.source https://github.com/kiwix/container-images - -ENV LANG C.UTF-8 -ENV OS_NAME bionic - -RUN apt update -q \ - && apt-get update \ - && apt install -q -y --no-install-recommends \ -# Base build tools - build-essential automake libtool cmake ccache pkg-config autopoint patch \ - python3-pip python3-setuptools python3-wheel git subversion wget unzip \ - ninja-build openssh-client curl \ -# Packaged dependencies - libbz2-dev uuid-dev zlib1g-dev \ - libgtest-dev \ -# Other tools (to remove) -# vim less grep \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \ - && pip3 install meson pytest gcovr requests distro - -# Create user -RUN groupadd --gid 121 runner -RUN useradd --uid 1001 --gid 121 --create-home runner -USER runner -ENV PATH /home/runner/.local/bin:$PATH diff --git a/kiwix-build_ci/manylinux_builder.dockerfile b/kiwix-build_ci/manylinux_builder.dockerfile new file mode 100644 index 00000000..6b7cd7e2 --- /dev/null +++ b/kiwix-build_ci/manylinux_builder.dockerfile @@ -0,0 +1,28 @@ +FROM quay.io/pypa/manylinux_2_28_x86_64 +LABEL org.opencontainers.image.source https://github.com/kiwix/container-images + +ENV LANG C.UTF-8 +ENV OS_NAME manylinux + +RUN dnf install -y --nodocs \ +# Base build tools + make automake libtool cmake git-core subversion pkg-config gcc-c++ \ + wget unzip ninja-build which patch xz openssh-clients \ +# Other tools (to remove) + vim less grep \ + && dnf remove -y "*-doc" \ + && dnf autoremove -y \ + && dnf clean all \ + && python3.12 -m pip install meson pytest requests distro + +ENV PATH /opt/_internal/cpython-3.12.3/bin:$PATH + +# Create user +RUN groupadd --gid 121 runner +RUN useradd --uid 1001 --gid 121 --create-home runner +USER runner +WORKDIR /home/runner + +RUN mkdir -p /home/runner/.local/bin +RUN ln -s /usr/local/bin/python3.12 /home/runner/.local/bin/python +ENV PATH /home/runner/.local/bin:$PATH