2021-08-06 03:56:07 +00:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Multi stage docker build for live cd tools in docker/container environment
|
|
|
|
# AlmaLinux Init + Live CD Tools + PyKickStart
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
FROM almalinux:8 as builder
|
|
|
|
|
|
|
|
RUN dnf install -y epel-release elrepo-release && \
|
|
|
|
dnf upgrade -y && \
|
2021-08-13 10:13:21 +00:00
|
|
|
mkdir -p /mnt/system-root /mnt/system-root/code; \
|
2021-08-09 03:46:11 +00:00
|
|
|
dnf install --enablerepo="powertools" --enablerepo="epel" --enablerepo="elrepo" --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y \
|
|
|
|
dnf \
|
|
|
|
systemd \
|
|
|
|
livecd-tools \
|
|
|
|
pykickstart \
|
|
|
|
hfsplus-tools \
|
|
|
|
grub2-efi-x64 \
|
|
|
|
grub2-efi-x64-cdboot \
|
|
|
|
shim-x64 ; \
|
2021-08-06 03:56:07 +00:00
|
|
|
rm -rf /mnt/system-root/var/cache/* ; \
|
|
|
|
dnf clean all; \
|
|
|
|
cp /etc/yum.repos.d/* /mnt/system-root/etc/yum.repos.d/ ; \
|
|
|
|
rm -rf /var/cache/yum;
|
|
|
|
|
|
|
|
# Create Final image from scratch for ks2rootfs
|
|
|
|
FROM scratch
|
|
|
|
|
|
|
|
COPY --from=builder /mnt/system-root/ /
|
|
|
|
|
2021-08-13 10:13:21 +00:00
|
|
|
WORKDIR /code
|
|
|
|
|
2021-08-06 03:56:07 +00:00
|
|
|
CMD ["/bin/bash"]
|