-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathContainerfile-micro
More file actions
18 lines (15 loc) · 976 Bytes
/
Containerfile-micro
File metadata and controls
18 lines (15 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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" \
org.opencontainers.image.authors="Magauer Lukas <lukas@magauer.eu>" \
org.opencontainers.image.description="Very small image which doesn't install the package manager." \
org.opencontainers.image.licenses="BSD-3-Clause" \
org.opencontainers.image.url="https://github.com/rocky-linux/sig-cloud-instance-images" \
org.opencontainers.image.vendor="Rocky Enterprise Software Foundation"
COPY --from=ubi-micro-build /mnt/rootfs/ /
COPY --from=ubi-micro-build /etc/yum.repos.d/* /etc/yum.repos.d/
CMD /bin/sh