sig-cloud-instance-images/Containerfile-micro
Lukas Magauer a43b9a4233
Build micro and init variants of the container images (#42)
* Add ubi-init and micro images

* Add CI
2023-04-07 09:50:11 -04:00

15 lines
697 B
Text

ARG ImageVersion
FROM rockylinux/rockylinux:$ImageVersion-ubi as ubi-micro-build
ARG ImageVersion
RUN yum install --installroot /mnt/rootfs coreutils-single glibc-minimal-langpack --releasever $ImageVersion --setopt install_weak_deps=false --nodocs -y && yum --installroot /mnt/rootfs clean all
RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
FROM scratch
LABEL summary="Rocky Linux UBI micro image" \
description="Very small image which doesn't install the package manager." \
maintainer="Magauer Lukas <lukas@magauer.eu>"
COPY --from=ubi-micro-build /mnt/rootfs/ /
COPY --from=ubi-micro-build /etc/yum.repos.d/* /etc/yum.repos.d/
CMD /bin/sh