diff --git a/packaging/images/el10/Containerfile b/packaging/images/el10/Containerfile index 320c8590d..bd92bd5bb 100644 --- a/packaging/images/el10/Containerfile +++ b/packaging/images/el10/Containerfile @@ -16,9 +16,16 @@ FROM registry.access.redhat.com/ubi10/go-toolset:1.26.10-1793622842 as proxy-bui WORKDIR /app COPY proxy /app USER 0 + +# Install runtime dependencies into a separate root for the final image +RUN dnf install -y --installroot=/runtime-root --setopt=install_weak_deps=False --nodocs \ + openssl-libs tzdata && \ + dnf --installroot=/runtime-root clean all + RUN CGO_ENABLED=1 CGO_CFLAGS=-flto GOEXPERIMENT=strictfipsruntime go build -FROM quay.io/flightctl/flightctl-base:10.1-1769518576 +FROM registry.access.redhat.com/ubi10/ubi-micro:10.2-1793858790 +COPY --from=proxy-build /runtime-root/ / COPY --from=ui-build /app/apps/standalone/dist /app/proxy/dist COPY --from=proxy-build /app/flightctl-ui /app/proxy WORKDIR /app/proxy diff --git a/packaging/images/el10/Containerfile.ocp b/packaging/images/el10/Containerfile.ocp index 9e0e73d1f..bcca26390 100644 --- a/packaging/images/el10/Containerfile.ocp +++ b/packaging/images/el10/Containerfile.ocp @@ -18,9 +18,16 @@ FROM registry.access.redhat.com/ubi10/go-toolset:1.26.10-1793622842 as proxy-bui WORKDIR /app COPY proxy /app USER 0 + +# Install runtime dependencies into a separate root for the final image +RUN dnf install -y --installroot=/runtime-root --setopt=install_weak_deps=False --nodocs \ + openssl-libs tzdata && \ + dnf --installroot=/runtime-root clean all + RUN CGO_ENABLED=1 CGO_CFLAGS=-flto GOEXPERIMENT=strictfipsruntime go build -FROM quay.io/flightctl/flightctl-base:10.1-1769518576 +FROM registry.access.redhat.com/ubi10/ubi-micro:10.2-1793858790 +COPY --from=proxy-build /runtime-root/ / COPY --from=ui-build /app/apps/ocp-plugin/dist /app/proxy/dist COPY --from=proxy-build /app/flightctl-ui /app/proxy WORKDIR /app/proxy diff --git a/packaging/images/el9/Containerfile b/packaging/images/el9/Containerfile index 3f1191e87..88fd338cf 100644 --- a/packaging/images/el9/Containerfile +++ b/packaging/images/el9/Containerfile @@ -16,9 +16,16 @@ FROM registry.access.redhat.com/ubi9/go-toolset:1.26.10-1793621864 as proxy-buil WORKDIR /app COPY proxy /app USER 0 + +# Install runtime dependencies into a separate root for the final image +RUN dnf install -y --installroot=/runtime-root --setopt=install_weak_deps=False --nodocs \ + openssl-libs tzdata && \ + dnf --installroot=/runtime-root clean all + RUN CGO_ENABLED=1 CGO_CFLAGS=-flto GOEXPERIMENT=strictfipsruntime go build -FROM quay.io/flightctl/flightctl-base:9.7-1762965531 +FROM registry.access.redhat.com/ubi9/ubi-micro:9.8-1793860449 +COPY --from=proxy-build /runtime-root/ / COPY --from=ui-build /app/apps/standalone/dist /app/proxy/dist COPY --from=proxy-build /app/flightctl-ui /app/proxy WORKDIR /app/proxy diff --git a/packaging/images/el9/Containerfile.ocp b/packaging/images/el9/Containerfile.ocp index 9b0bb9110..9d6b4fef6 100644 --- a/packaging/images/el9/Containerfile.ocp +++ b/packaging/images/el9/Containerfile.ocp @@ -18,9 +18,16 @@ FROM registry.access.redhat.com/ubi9/go-toolset:1.26.10-1793621864 as proxy-buil WORKDIR /app COPY proxy /app USER 0 + +# Install runtime dependencies into a separate root for the final image +RUN dnf install -y --installroot=/runtime-root --setopt=install_weak_deps=False --nodocs \ + openssl-libs tzdata && \ + dnf --installroot=/runtime-root clean all + RUN CGO_ENABLED=1 CGO_CFLAGS=-flto GOEXPERIMENT=strictfipsruntime go build -FROM quay.io/flightctl/flightctl-base:9.7-1762965531 +FROM registry.access.redhat.com/ubi9/ubi-micro:9.8-1793860449 +COPY --from=proxy-build /runtime-root/ / COPY --from=ui-build /app/apps/ocp-plugin/dist /app/proxy/dist COPY --from=proxy-build /app/flightctl-ui /app/proxy WORKDIR /app/proxy