# This dockerfile builds the content in the current repo for OCP4
FROM registry.fedoraproject.org/fedora-minimal:33 as builder

WORKDIR /content

COPY . .

RUN microdnf -y install cmake make git /usr/bin/python3 python3-pyyaml python3-jinja2 openscap-utils

RUN ./build_product --datastream-only --debug ocp4 rhel7 rhcos4

FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /
COPY --from=builder /content/build/ssg-ocp4-ds.xml .
COPY --from=builder /content/build/ssg-rhel7-ds.xml .
COPY --from=builder /content/build/ssg-rhcos4-ds.xml .
