1
0
mirror of https://github.com/AlmaLinux/ks2rootfs.git synced 2024-11-24 10:13:08 +00:00

Create Dockerfile.livecd

This commit is contained in:
Bala Raman 2021-08-05 23:56:07 -04:00 committed by GitHub
parent 9605859321
commit db88cc2bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

23
Dockerfile.livecd Normal file
View File

@ -0,0 +1,23 @@
# ----------------------------------------------------------------------------
# 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 && \
mkdir -p /mnt/system-root /mnt/system-root/build; \
dnf install --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y dnf systemd \
livecd-tools pykickstart \
tar ; \
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/ /
CMD ["/bin/bash"]