From 29f598973be5a6a2d68ab481f7bbe05e3b0c5533 Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Wed, 9 Sep 2026 15:43:45 -0400 Subject: [PATCH] feat(Dockerfile): modify base to use ubi-micro ref: LOG-10108 --- Dockerfile | 24 +++++++++++++++++++----- Dockerfile.art | 18 ++++++++++++++++-- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 579d8b1ba2300..dbb60ef7d77ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,12 +29,26 @@ COPY . /src RUN PROTOC=/src/thirdparty/protoc/protoc-linux-$(arch) make build -FROM registry.access.redhat.com/ubi9/ubi-minimal +FROM registry.access.redhat.com/ubi9/ubi:latest AS packages + +# Install ubi-micro runtime packages into a staging root directory using DNF +RUN mkdir -p /mnt/rootfs && \ + dnf install -y --installroot=/mnt/rootfs \ + --releasever=9 \ + --setopt=install_weak_deps=false \ + --nodocs \ + systemd \ + tar \ + crypto-policies-scripts && \ + dnf --installroot=/mnt/rootfs clean all + +FROM registry.access.redhat.com/ubi9/ubi-micro + +COPY --from=packages /mnt/rootfs/ / +# Copy PQ crypto-policies configuration from builder +COPY --from=builder /etc/crypto-policies/ /etc/crypto-policies/ +COPY --from=builder /src/target/release/vector /usr/bin/ -RUN microdnf install -y systemd tar && \ - microdnf clean all - -COPY --from=builder /src/target/release/vector /usr/bin WORKDIR /usr/bin CMD ["/usr/bin/vector"] diff --git a/Dockerfile.art b/Dockerfile.art index 49c0ec0fa2fd7..fcd5a8ab97a26 100644 --- a/Dockerfile.art +++ b/Dockerfile.art @@ -18,10 +18,24 @@ RUN PROTOC=/opt/app-root/src/thirdparty/protoc/protoc-linux-$(arch) make build-o RUN cp /opt/app-root/src/target/release/vector /usr/bin -FROM registry.access.redhat.com/ubi9/ubi-minimal +FROM registry.access.redhat.com/ubi9/ubi:latest AS packages +# Install ubi-micro runtime packages into a staging root directory using DNF +RUN mkdir -p /mnt/rootfs && \ + dnf install -y --installroot=/mnt/rootfs \ + --releasever=9 \ + --setopt=install_weak_deps=false \ + --nodocs \ + systemd \ + crypto-policies-scripts && \ + dnf --installroot=/mnt/rootfs clean all + +FROM registry.access.redhat.com/ubi9/ubi-micro + +COPY --from=packages /mnt/rootfs/ / COPY --from=builder /usr/bin/vector /usr/bin/ -RUN microdnf install -y systemd +# Copy PQ crypto-policies configuration from builder +COPY --from=builder /etc/crypto-policies/ /etc/crypto-policies/ WORKDIR /usr/bin CMD ["/usr/bin/vector"]