FROM oraclelinux:9

ARG OCIREG
ARG OCIDOM

RUN echo "$OCIREG" > /etc/yum/vars/ociregion
RUN echo "$OCIDOM" > /etc/yum/vars/ocidomain
RUN dnf upgrade -y

RUN dnf -y install image-builder osbuild python3-osbuild
RUN dnf clean all

ENTRYPOINT ["/usr/bin/image-builder"]

VOLUME /output
WORKDIR /output
VOLUME /store
VOLUME /rpmmd
VOLUME /var/lib/containers/storage

LABEL description="This tools allows to build and deploy disk-images from bootc container inputs."
LABEL io.k8s.description="This tools allows to build and deploy disk-images from bootc container inputs."
LABEL io.k8s.display-name="Bootc Image Builder"
LABEL summary="A container to create disk-images from bootc container inputs"