From 655d512523353961a67cf19cf3bc227d403898f0 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Sat, 22 Feb 2025 14:37:39 +0800 Subject: [PATCH] build: Upgrade to 24.04 in Dockerfile `arm64` build in ubuntu:22.04 errors out with `error processing package libc-bin`. This issue is a known issue between the binfmt (running different architectures via QEMU) and the libc ldconfig binary running in container. We're "suddenly" having issues as ubuntu-latest (which is the OS version we run the GH action container with) was recently changed from 22.04 to 24.04 and hence why upgrading the container userspace from 22.04 to 24.04 solves the problem. Removed deprecated package `python3-distutils`. Update image name from `20250111-0` to `20250222-0`. Signed-off-by: Ruoqing He --- .github/workflows/docker-image.yaml | 2 +- resources/Dockerfile | 35 +++++++++++++++-------------- scripts/dev_cli.sh | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 9841c398b..dfcf75d0a 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -41,7 +41,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # generate Docker tags based on the following events/attributes tags: | - type=raw,value=20250111-0 + type=raw,value=20250222-0 type=sha - name: Build and push diff --git a/resources/Dockerfile b/resources/Dockerfile index 4425fdfdb..7c437019c 100644 --- a/resources/Dockerfile +++ b/resources/Dockerfile @@ -5,7 +5,7 @@ # When changing this file don't forget to update the tag name in the # .github/workflows/docker-image.yaml file if doing multiple per day -FROM ubuntu:22.04 as dev +FROM ubuntu:24.04 AS dev ARG TARGETARCH ARG RUST_TOOLCHAIN="1.77.0" @@ -48,7 +48,6 @@ RUN apt-get update \ python3 \ python3-setuptools \ ntfs-3g \ - python3-distutils \ uuid-dev \ iperf3 \ zip \ @@ -126,21 +125,23 @@ RUN echo 'source $CARGO_HOME/env' >> "$HOME"/.bashrc \ # only for 'x86_64' platform images as 'docker buildx' can't build 'spdk' # hadolint ignore=DL3003,SC2046 RUN if [ "$TARGETARCH" = "amd64" ]; then \ - git clone https://github.com/spdk/spdk \ - && cd spdk \ - && git checkout ef8bcce58f3f02b79c0619a297e4f17e81e62b24 \ - && git submodule update --init \ - && apt-get update \ - && ./scripts/pkgdep.sh \ - && apt-get clean \ - && ./configure --with-vfio-user \ - && make -j $(nproc) TARGET_ARCHITECTURE=skylake \ - && rm -rf /usr/local/bin/spdk-nvme \ - && mkdir /usr/local/bin/spdk-nvme \ - && cp -f ./build/bin/nvmf_tgt /usr/local/bin/spdk-nvme \ - && cp -f ./scripts/rpc.py /usr/local/bin/spdk-nvme \ - && cp -rf ./python /usr/local/bin \ - && cd .. && rm -rf spdk; fi + # Allow pip to install packages system wide + rm /usr/lib/python3.12/EXTERNALLY-MANAGED \ + && git clone https://github.com/spdk/spdk \ + && cd spdk \ + && git checkout ef8bcce58f3f02b79c0619a297e4f17e81e62b24 \ + && git submodule update --init \ + && apt-get update \ + && ./scripts/pkgdep.sh \ + && apt-get clean \ + && ./configure --with-vfio-user \ + && make -j $(nproc) TARGET_ARCHITECTURE=skylake \ + && rm -rf /usr/local/bin/spdk-nvme \ + && mkdir /usr/local/bin/spdk-nvme \ + && cp -f ./build/bin/nvmf_tgt /usr/local/bin/spdk-nvme \ + && cp -f ./scripts/rpc.py /usr/local/bin/spdk-nvme \ + && cp -rf ./python /usr/local/bin \ + && cd .. && rm -rf spdk; fi # install ethr tool for performance tests RUN if [ "$TARGETARCH" = "amd64" ]; then \ diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index dc2fe6a71..a97ad1a55 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -9,7 +9,7 @@ CLI_NAME="Cloud Hypervisor" CTR_IMAGE_TAG="ghcr.io/cloud-hypervisor/cloud-hypervisor" # Needs to match explicit version in docker-image.yaml workflow -CTR_IMAGE_VERSION="20250111-0" +CTR_IMAGE_VERSION="20250222-0" : "${CTR_IMAGE:=${CTR_IMAGE_TAG}:${CTR_IMAGE_VERSION}}" DOCKER_RUNTIME="docker"