diff --git a/.github/workflows/image_base.yml b/.github/workflows/image_base.yml index 8a2eeb294a..886d9f3f03 100644 --- a/.github/workflows/image_base.yml +++ b/.github/workflows/image_base.yml @@ -3,7 +3,7 @@ name: base on: push: branches: - - 'base' + - 'new_build_process' jobs: baseimagebuild: @@ -57,9 +57,9 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./Dockerfile.base + file: ./Dockerfile.builder platforms: linux/amd64 push: true - tags: quay.io/sustainable_computing_io/kepler_base:latest-libbpf-amd64-simplified + tags: quay.io/sustainable_computing_io/kepler_builder:ubi-9-libbpf-1.2.0 - name: Create and upload multi-arch image run: make multi-arch-image-base diff --git a/Dockerfile.builder b/Dockerfile.builder new file mode 100644 index 0000000000..f684ffb101 --- /dev/null +++ b/Dockerfile.builder @@ -0,0 +1,33 @@ +FROM registry.access.redhat.com/ubi9/go-toolset:1.20 as builder + +USER 0 + +RUN yum -y install yum-utils +RUN yum-config-manager --enable ubi-9-baseos-source + +WORKDIR /elfutils-source +RUN yumdownloader --source elfutils +RUN yum -y install cpio +RUN rpm2cpio elfutils-0.189-3.el9.src.rpm | cpio -iv +RUN tar xjvf elfutils-0.189.tar.bz2 +WORKDIR /elfutils-source/elfutils-0.189 +RUN ./configure --disable-debuginfod +RUN make install + + +WORKDIR /libbpf-source +RUN yumdownloader --source libbpf +RUN rpm2cpio libbpf-1.2.0-1.el9.src.rpm | cpio -iv +RUN tar xf ./linux-*el9.tar.xz +WORKDIR /libbpf-source/linux-5.14.0-333.el9/tools/lib/bpf +RUN make install_headers +RUN prefix=/usr BUILD_STATIC_ONLY=y make install +WORKDIR /libbpf-source/linux-5.14.0-333.el9/tools/bpf +RUN make bpftool + +RUN yum -y install clang + +# enable EPEL and install cpuid +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +RUN yum install -y cpuid +RUN yum clean all