Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .tekton/lightspeed-stack-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions .tekton/lightspeed-stack-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 11 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# vim: set filetype=dockerfile
FROM registry.access.redhat.com/ubi9/python-312 AS builder
ARG BUILDER_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312
ARG BUILDER_DNF_COMMAND=dnf
ARG RUNTIME_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312-minimal
ARG RUNTIME_DNF_COMMAND=microdnf

FROM ${BUILDER_BASE_IMAGE} AS builder

ARG BUILDER_DNF_COMMAND=dnf
ARG APP_ROOT=/app-root
ARG LSC_SOURCE_DIR=.

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

# Install uv package manager
RUN pip3.12 install "uv>=0.8.15"
Expand Down Expand Up @@ -51,7 +57,8 @@ 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 RUNTIME_DNF_COMMAND=microdnf
ARG APP_ROOT=/app-root
WORKDIR /app-root

Expand Down Expand Up @@ -79,7 +86,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 && \
Expand Down
4 changes: 4 additions & 0 deletions build-args-konflux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BUILDER_BASE_IMAGE=registry.redhat.io/rhai/base-image-cpu-rhel9:3.2
BUILDER_DNF_COMMAND=dnf
RUNTIME_BASE_IMAGE=registry.redhat.io/rhai/base-image-cpu-rhel9:3.2
RUNTIME_DNF_COMMAND=dnf
69 changes: 69 additions & 0 deletions redhat.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[codeready-builder-for-rhel-9-$basearch-eus-rpms]
name = Red Hat CodeReady Linux Builder for RHEL 9 $basearch - Extended Update Support (RPMs)
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/codeready-builder/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 0
sslclientkey = $SSL_CLIENT_KEY
sslclientcert = $SSL_CLIENT_CERT

[rhel-9-for-$basearch-appstream-eus-rpms]
name = Red Hat Enterprise Linux 9 for $basearch - AppStream - Extended Update Support (RPMs)
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/appstream/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 0
sslclientkey = $SSL_CLIENT_KEY
sslclientcert = $SSL_CLIENT_CERT

[rhel-9-for-$basearch-baseos-eus-rpms]
name = Red Hat Enterprise Linux 9 for $basearch - BaseOS - Extended Update Support (RPMs)
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/baseos/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 0
sslclientkey = $SSL_CLIENT_KEY
sslclientcert = $SSL_CLIENT_CERT

[rhocp-4.17-for-rhel-9-$basearch-rpms]
name = Red Hat OpenShift Container Platform 4.17 for RHEL 9 $basearch (RPMs)
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/$basearch/rhocp/4.17/os
enabled = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 0
sslclientkey = $SSL_CLIENT_KEY
sslclientcert = $SSL_CLIENT_CERT

[rhocp-4.17-for-rhel-9-$basearch-source-rpms]
name = Red Hat OpenShift Container Platform 4.17 for RHEL 9 $basearch (Source RPMs)
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/$basearch/rhocp/4.17/source/SRPMS
enabled = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 0
sslclientkey = $SSL_CLIENT_KEY
sslclientcert = $SSL_CLIENT_CERT
8 changes: 1 addition & 7 deletions rpms.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ packages:
patch,
cmake,
cargo,
libpq,
libtiff,
openjpeg2,
lcms2,
libjpeg-turbo,
libwebp,
]
contentOrigin:
repofiles: ["./ubi.repo"]
repofiles: ["./redhat.repo"]
arches: [x86_64, aarch64]
Loading
Loading