From 7b5baa5104d87ff3d697f3708cb049601a8d35fa Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Thu, 2 Jul 2026 10:23:38 +0200 Subject: [PATCH] ci: Speedup fhi72 dockerfiles Move COPY . . down in 7.2 dockerfiles. This layer doesn't cache well due to changes in docker context, moving it down allows docker builder to cache other layers that are not affected by the context. Signed-off-by: Bartosz Podrygajlo --- docker/Dockerfile.build.fhi72.native_arm.ubuntu | 3 ++- docker/Dockerfile.build.fhi72.rhel9 | 3 ++- docker/Dockerfile.build.fhi72.t2.ubuntu | 4 +++- docker/Dockerfile.build.fhi72.ubuntu | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.build.fhi72.native_arm.ubuntu b/docker/Dockerfile.build.fhi72.native_arm.ubuntu index eb3dd4b7c7..fb0c971fc4 100644 --- a/docker/Dockerfile.build.fhi72.native_arm.ubuntu +++ b/docker/Dockerfile.build.fhi72.native_arm.ubuntu @@ -27,7 +27,6 @@ RUN apt-get update && \ RUN rm -Rf /oai-ran WORKDIR /oai-ran -COPY . . ## Download and build DPDK RUN wget --no-verbose http://fast.dpdk.org/rel/dpdk-24.11.4.tar.xz && \ @@ -54,6 +53,8 @@ RUN git clone https://git.gitlab.arm.com/networking/ral.git /opt/ral && \ ninja && \ ninja install +COPY . . + FROM ran-base AS ran-build-fhi72 ## Build and install OAI #run build_oai to build the target image diff --git a/docker/Dockerfile.build.fhi72.rhel9 b/docker/Dockerfile.build.fhi72.rhel9 index ec26015da2..243899606c 100644 --- a/docker/Dockerfile.build.fhi72.rhel9 +++ b/docker/Dockerfile.build.fhi72.rhel9 @@ -12,7 +12,6 @@ ENV TZ=Europe RUN rm -Rf /oai-ran WORKDIR /oai-ran -COPY . . ARG xran_VERSION=11.1.1 @@ -31,6 +30,8 @@ RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \ cd /opt/phy/fhi_lib/lib && \ WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=/oai-ran/dpdk-stable-24.11.4/ XRAN_DIR=/opt/phy/fhi_lib make XRAN_LIB_SO=1 +COPY . . + FROM ran-base AS ran-build-fhi72 ARG E2AP_VERSION=E2AP_V3 ARG KPM_VERSION=KPM_V3_00 diff --git a/docker/Dockerfile.build.fhi72.t2.ubuntu b/docker/Dockerfile.build.fhi72.t2.ubuntu index cb4f4975f5..cb9dca1aa9 100644 --- a/docker/Dockerfile.build.fhi72.t2.ubuntu +++ b/docker/Dockerfile.build.fhi72.t2.ubuntu @@ -27,7 +27,7 @@ RUN apt-get update && \ RUN rm -Rf /oai-ran WORKDIR /oai-ran -COPY . . + ## Copy T2 patch COPY ./$T2_PATCH /opt/. ## Download and build DPDK @@ -46,6 +46,8 @@ RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \ cd /opt/phy/fhi_lib/lib && \ WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=/oai-ran/dpdk-$DPDK_VERSION/ XRAN_DIR=/opt/phy/fhi_lib make XRAN_LIB_SO=1 +COPY . . + FROM ran-base AS ran-build-fhi72-t2 ## Build and install OAI ## Run build_oai to build the target image, if T2 patch present, build with T2 support diff --git a/docker/Dockerfile.build.fhi72.ubuntu b/docker/Dockerfile.build.fhi72.ubuntu index a3d80ae8af..a2d0fcf743 100644 --- a/docker/Dockerfile.build.fhi72.ubuntu +++ b/docker/Dockerfile.build.fhi72.ubuntu @@ -32,7 +32,6 @@ RUN apt-get update && \ RUN rm -Rf /oai-ran WORKDIR /oai-ran -COPY . . RUN git clone https://github.com/CESNET/libyang.git && \ cd libyang && \ @@ -81,6 +80,8 @@ RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \ cd /opt/phy/fhi_lib/lib && \ WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=/oai-ran/dpdk-stable-24.11.4/ XRAN_DIR=/opt/phy/fhi_lib make XRAN_LIB_SO=1 +COPY . . + FROM ran-base AS ran-build-fhi72 ## Build and install OAI #run build_oai to build the target image