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
22 changes: 14 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN INSTALL_PKGS=" \
llvm \
cyrus-sasl-devel \
libtool \
crypto-policies-scripts \
" && \
dnf install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
Expand All @@ -33,18 +32,25 @@ COPY . /src
RUN /src/scripts/environment/install-protoc.sh
RUN make build

FROM registry.access.redhat.com/ubi9/ubi-micro

RUN microdnf install -y \
RUN mkdir -p /mnt/rootfs && \
dnf install -y --installroot /mnt/rootfs \
--releasever 9 \
--setopt install_weak_deps=false \
--nodocs \
systemd \
openssl-libs \
cyrus-sasl-lib \
crypto-policies-scripts \
ca-certificates && \
microdnf clean all
dnf --installroot /mnt/rootfs clean all

RUN chroot /mnt/rootfs update-crypto-policies --set DEFAULT:PQ

FROM registry.access.redhat.com/ubi9/ubi-micro

COPY --from=builder /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/vector

COPY --from=builder /src/target/release/vector /usr/bin
WORKDIR /usr/bin
CMD ["/usr/bin/vector"]
34 changes: 20 additions & 14 deletions Dockerfile.art
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi9/ubi-minimal AS builder
FROM registry.access.redhat.com/ubi9/ubi:latest AS builder

RUN INSTALL_PKGS=" \
gcc-c++ \
Expand All @@ -8,12 +8,12 @@ RUN INSTALL_PKGS=" \
openssl-devel \
llvm-toolset \
rust-toolset-1.92.0 \
crypto-policies-scripts \
" && \
microdnf install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS
dnf install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
dnf clean all

# Enable post-quantum cryptography
# Enable post-quantum cryptography in builder environment
RUN update-crypto-policies --set DEFAULT:PQ

COPY . /opt/app-root/src
Expand All @@ -27,19 +27,25 @@ RUN make build-offline
# See: https://github.com/openshift/enhancements/pull/2021
RUN strip --strip-all /opt/app-root/src/target/release/vector

RUN cp /opt/app-root/src/target/release/vector /usr/bin

FROM registry.access.redhat.com/ubi9/ubi-micro

COPY --from=builder /usr/bin/vector /usr/bin/
RUN microdnf install -y \
# 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 \
openssl-libs \
crypto-policies-scripts \
ca-certificates
ca-certificates && \
dnf --installroot /mnt/rootfs clean all

# Configure PQ crypto policy inside the staging root filesystem
RUN chroot /mnt/rootfs update-crypto-policies --set DEFAULT:PQ

FROM registry.access.redhat.com/ubi9/ubi-micro

# Copy PQ crypto-policies configuration from builder
COPY --from=builder /etc/crypto-policies/ /etc/crypto-policies/
COPY --from=builder /mnt/rootfs/ /
COPY --from=builder /opt/app-root/src/target/release/vector /usr/bin/vector

WORKDIR /usr/bin
CMD ["/usr/bin/vector"]
Expand Down