From 6f0def9ba2b8880c8726f649160394cd55f9f88d Mon Sep 17 00:00:00 2001 From: Haoyu Sun Date: Wed, 28 Jan 2026 17:47:12 +0100 Subject: [PATCH] konflux: use rhai base image Signed-off-by: Haoyu Sun --- .tekton/lightspeed-stack-pull-request.yaml | 2 ++ .tekton/lightspeed-stack-push.yaml | 2 ++ Containerfile | 7 +++++-- build-args-konflux.conf | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 build-args-konflux.conf diff --git a/.tekton/lightspeed-stack-pull-request.yaml b/.tekton/lightspeed-stack-pull-request.yaml index 698848ce..972cc246 100644 --- a/.tekton/lightspeed-stack-pull-request.yaml +++ b/.tekton/lightspeed-stack-pull-request.yaml @@ -66,6 +66,8 @@ spec: value: 'true' - name: dockerfile value: Containerfile + - name: build-args-file + value: build-args-konflux.conf pipelineSpec: description: | This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization. diff --git a/.tekton/lightspeed-stack-push.yaml b/.tekton/lightspeed-stack-push.yaml index a2404092..17b1f910 100644 --- a/.tekton/lightspeed-stack-push.yaml +++ b/.tekton/lightspeed-stack-push.yaml @@ -58,6 +58,8 @@ spec: value: 'true' - name: dockerfile value: Containerfile + - name: build-args-file + value: build-args-konflux.conf pipelineSpec: description: | This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization. diff --git a/Containerfile b/Containerfile index fb040d60..21b4fa35 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,7 @@ # vim: set filetype=dockerfile +ARG RUNTIME_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312-minimal +ARG RUNTIME_DNF_COMMAND=microdnf + FROM registry.access.redhat.com/ubi9/python-312 AS builder ARG APP_ROOT=/app-root @@ -51,7 +54,7 @@ RUN if [ -f /cachi2/cachi2.env ]; then \ RUN uv pip uninstall ecdsa # Final image without uv package manager -FROM registry.access.redhat.com/ubi9/python-312-minimal +FROM ${RUNTIME_BASE_IMAGE} ARG APP_ROOT=/app-root WORKDIR /app-root @@ -79,7 +82,7 @@ COPY --from=builder /app-root/LICENSE /licenses/ USER root # Additional tools for derived images -RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs jq patch libpq libtiff openjpeg2 lcms2 libjpeg-turbo libwebp +RUN ${RUNTIME_DNF_COMMAND} install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs jq patch # Create llama-stack directories for library mode RUN mkdir -p /opt/app-root/src/.llama/storage /opt/app-root/src/.llama/providers.d && \ diff --git a/build-args-konflux.conf b/build-args-konflux.conf new file mode 100644 index 00000000..54d2b407 --- /dev/null +++ b/build-args-konflux.conf @@ -0,0 +1,2 @@ +RUNTIME_BASE_IMAGE=registry.redhat.io/rhai/base-image-cpu-rhel9:3.2 +RUNTIME_DNF_COMMAND=dnf