Skip to content

Commit 44fb3d1

Browse files
committed
konflux: use rhai base image
Signed-off-by: Haoyu Sun <hasun@redhat.com>
1 parent 1c081a6 commit 44fb3d1

8 files changed

Lines changed: 153 additions & 697 deletions

‎.tekton/lightspeed-stack-pull-request.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
value: 'true'
6767
- name: dockerfile
6868
value: Containerfile
69+
- name: build-args-file
70+
value: build-args-konflux.conf
6971
pipelineSpec:
7072
description: |
7173
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

‎.tekton/lightspeed-stack-push.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ spec:
5858
value: 'true'
5959
- name: dockerfile
6060
value: Containerfile
61+
- name: build-args-file
62+
value: build-args-konflux.conf
6163
pipelineSpec:
6264
description: |
6365
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

‎Containerfile‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# vim: set filetype=dockerfile
2-
FROM registry.access.redhat.com/ubi9/python-312 AS builder
2+
ARG BUILDER_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312
3+
ARG BUILDER_DNF_COMMAND=dnf
4+
ARG RUNTIME_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312-minimal
5+
ARG RUNTIME_DNF_COMMAND=microdnf
36

7+
FROM ${BUILDER_BASE_IMAGE} AS builder
8+
9+
ARG BUILDER_DNF_COMMAND=dnf
410
ARG APP_ROOT=/app-root
511
ARG LSC_SOURCE_DIR=.
612

@@ -18,7 +24,7 @@ USER root
1824
# Install gcc - required by polyleven python package on aarch64
1925
# (dependency of autoevals, no pre-built binary wheels for linux on aarch64)
2026
# cmake and cargo are required by fastuuid, maturin
21-
RUN dnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs gcc cmake cargo
27+
RUN ${BUILDER_DNF_COMMAND} install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs gcc cmake cargo
2228

2329
# Install uv package manager
2430
RUN pip3.12 install "uv>=0.8.15"
@@ -51,7 +57,8 @@ RUN if [ -f /cachi2/cachi2.env ]; then \
5157
RUN uv pip uninstall ecdsa
5258

5359
# Final image without uv package manager
54-
FROM registry.access.redhat.com/ubi9/python-312-minimal
60+
FROM ${RUNTIME_BASE_IMAGE}
61+
ARG RUNTIME_DNF_COMMAND=microdnf
5562
ARG APP_ROOT=/app-root
5663
WORKDIR /app-root
5764

@@ -79,7 +86,7 @@ COPY --from=builder /app-root/LICENSE /licenses/
7986
USER root
8087

8188
# Additional tools for derived images
82-
RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs jq patch libpq libtiff openjpeg2 lcms2 libjpeg-turbo libwebp
89+
RUN ${RUNTIME_DNF_COMMAND} install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs jq patch
8390

8491
# Create llama-stack directories for library mode
8592
RUN mkdir -p /opt/app-root/src/.llama/storage /opt/app-root/src/.llama/providers.d && \

‎build-args-konflux.conf‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BUILDER_BASE_IMAGE=registry.redhat.io/rhai/base-image-cpu-rhel9:3.2
2+
BUILDER_DNF_COMMAND=dnf
3+
RUNTIME_BASE_IMAGE=registry.redhat.io/rhai/base-image-cpu-rhel9:3.2
4+
RUNTIME_DNF_COMMAND=dnf

‎redhat.repo‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[codeready-builder-for-rhel-9-$basearch-eus-rpms]
2+
name = Red Hat CodeReady Linux Builder for RHEL 9 $basearch - Extended Update Support (RPMs)
3+
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/codeready-builder/os
4+
enabled = 1
5+
gpgcheck = 1
6+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
7+
sslverify = 1
8+
sslcacert = /etc/rhsm/ca/redhat-uep.pem
9+
sslverifystatus = 1
10+
metadata_expire = 86400
11+
enabled_metadata = 0
12+
sslclientkey = $SSL_CLIENT_KEY
13+
sslclientcert = $SSL_CLIENT_CERT
14+
15+
[rhel-9-for-$basearch-appstream-eus-rpms]
16+
name = Red Hat Enterprise Linux 9 for $basearch - AppStream - Extended Update Support (RPMs)
17+
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/appstream/os
18+
enabled = 1
19+
gpgcheck = 1
20+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
21+
sslverify = 1
22+
sslcacert = /etc/rhsm/ca/redhat-uep.pem
23+
sslverifystatus = 1
24+
metadata_expire = 86400
25+
enabled_metadata = 0
26+
sslclientkey = $SSL_CLIENT_KEY
27+
sslclientcert = $SSL_CLIENT_CERT
28+
29+
[rhel-9-for-$basearch-baseos-eus-rpms]
30+
name = Red Hat Enterprise Linux 9 for $basearch - BaseOS - Extended Update Support (RPMs)
31+
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/baseos/os
32+
enabled = 1
33+
gpgcheck = 1
34+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
35+
sslverify = 1
36+
sslcacert = /etc/rhsm/ca/redhat-uep.pem
37+
sslverifystatus = 1
38+
metadata_expire = 86400
39+
enabled_metadata = 0
40+
sslclientkey = $SSL_CLIENT_KEY
41+
sslclientcert = $SSL_CLIENT_CERT
42+
43+
[rhocp-4.17-for-rhel-9-$basearch-rpms]
44+
name = Red Hat OpenShift Container Platform 4.17 for RHEL 9 $basearch (RPMs)
45+
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/$basearch/rhocp/4.17/os
46+
enabled = 0
47+
gpgcheck = 1
48+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
49+
sslverify = 1
50+
sslcacert = /etc/rhsm/ca/redhat-uep.pem
51+
sslverifystatus = 1
52+
metadata_expire = 86400
53+
enabled_metadata = 0
54+
sslclientkey = $SSL_CLIENT_KEY
55+
sslclientcert = $SSL_CLIENT_CERT
56+
57+
[rhocp-4.17-for-rhel-9-$basearch-source-rpms]
58+
name = Red Hat OpenShift Container Platform 4.17 for RHEL 9 $basearch (Source RPMs)
59+
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/$basearch/rhocp/4.17/source/SRPMS
60+
enabled = 0
61+
gpgcheck = 1
62+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
63+
sslverify = 1
64+
sslcacert = /etc/rhsm/ca/redhat-uep.pem
65+
sslverifystatus = 1
66+
metadata_expire = 86400
67+
enabled_metadata = 0
68+
sslclientkey = $SSL_CLIENT_KEY
69+
sslclientcert = $SSL_CLIENT_CERT

‎rpms.in.yaml‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ packages:
55
patch,
66
cmake,
77
cargo,
8-
libpq,
9-
libtiff,
10-
openjpeg2,
11-
lcms2,
12-
libjpeg-turbo,
13-
libwebp,
148
]
159
contentOrigin:
16-
repofiles: ["./ubi.repo"]
10+
repofiles: ["./redhat.repo"]
1711
arches: [x86_64, aarch64]

0 commit comments

Comments
 (0)