mirror of
https://github.com/AlmaLinux/ks2rootfs.git
synced 2024-11-30 12:13:08 +00:00
Compare commits
2 Commits
a057c573cd
...
5b08b30d90
Author | SHA1 | Date | |
---|---|---|---|
|
5b08b30d90 | ||
85cd73cd65 |
@ -7,14 +7,12 @@ FROM almalinux:8 as builder
|
|||||||
RUN dnf install -y epel-release && \
|
RUN dnf install -y epel-release && \
|
||||||
# dnf upgrade -y && \
|
# dnf upgrade -y && \
|
||||||
mkdir -p /mnt/system-root /mnt/system-root/build; \
|
mkdir -p /mnt/system-root /mnt/system-root/build; \
|
||||||
dnf --nogpgcheck --repoid=BaseOS --repoid=AppStream --enablerepo=powertools --enablerepo="epel" \
|
dnf --enablerepo=powertools --enablerepo="epel" \
|
||||||
--repofrompath='BaseOS,https://repo.almalinux.org/almalinux/8.5-beta/BaseOS/$basearch/kickstart/' \
|
|
||||||
--repofrompath='AppStream,https://repo.almalinux.org/almalinux/8.5-beta/AppStream/$basearch/kickstart/' \
|
|
||||||
# --repofrompath='powertools,https://repo.almalinux.org/almalinux/8/PowerTools/$basearch/kickstart/' \
|
|
||||||
install --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y \
|
install --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y \
|
||||||
bash \
|
bash \
|
||||||
dnf \
|
dnf \
|
||||||
glibc-minimal-langpack \
|
glibc-all-langpacks \
|
||||||
|
glibc-langpack-en \
|
||||||
anaconda-tui \
|
anaconda-tui \
|
||||||
appliance-tools \
|
appliance-tools \
|
||||||
lorax \
|
lorax \
|
||||||
@ -38,17 +36,25 @@ RUN dnf install -y epel-release && \
|
|||||||
systemd \
|
systemd \
|
||||||
livecd-tools \
|
livecd-tools \
|
||||||
pykickstart \
|
pykickstart \
|
||||||
grub2-efi-*64 \
|
# grub2-efi-*64 \
|
||||||
grub2-efi-*64-cdboot \
|
# grub2-efi-*64-cdboot \
|
||||||
shim-*64 ; \
|
# shim-*64 \
|
||||||
cp /etc/yum.repos.d/e* /mnt/system-root/etc/yum.repos.d/ ; \
|
tini ; \
|
||||||
|
# Temp fix for dnf until fix is ported to EL8
|
||||||
|
# imgcreate.errors.MountError: Unable to unmount filesystem at /var/tmp/imgcreate-XXXXXX/install_root/var/cache/dnf.
|
||||||
|
cwd=$PWD \
|
||||||
|
cd /mnt/system-root/usr/lib/python3.6/site-packages/dnf/ ;\
|
||||||
|
mv base.py base.py_saved ;\
|
||||||
|
curl -LO https://raw.githubusercontent.com/AlmaLinux/sig-livemedia/build-fix/work/scripts/base.py ; \
|
||||||
|
cd $cwd ; \
|
||||||
|
# cp /etc/yum.repos.d/e* /mnt/system-root/etc/yum.repos.d/ ; \
|
||||||
/bin/date +%Y%m%d_%H%M > /mnt/system-root/etc/BUILDTIME ;\
|
/bin/date +%Y%m%d_%H%M > /mnt/system-root/etc/BUILDTIME ;\
|
||||||
# set DNF infra variable to container for compatibility with CentOS
|
# set DNF infra variable to container for compatibility with CentOS
|
||||||
echo 'container' > /mnt/system-root/etc/dnf/vars/infra; \
|
# echo 'container' > /mnt/system-root/etc/dnf/vars/infra; \
|
||||||
# install only en_US.UTF-8 locale files, see
|
# install only en_US.UTF-8 locale files, see
|
||||||
# https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging for details
|
# https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging for details
|
||||||
echo '%_install_langs en_US.UTF-8' > /mnt/system-root/etc/rpm/macros.image-language-conf; \
|
# echo '%_install_langs en_US.UTF-8' > /mnt/system-root/etc/rpm/macros.image-language-conf; \
|
||||||
echo 'LANG="C.utf8"' > /mnt/system-root/etc/locale.conf; \
|
echo 'LANG="en_US.UTF-8"' > /mnt/system-root/etc/locale.conf; \
|
||||||
touch /mnt/system-root/etc/machine-id; \
|
touch /mnt/system-root/etc/machine-id; \
|
||||||
rm -rf /var/cache/yum;
|
rm -rf /var/cache/yum;
|
||||||
#
|
#
|
||||||
@ -67,8 +73,8 @@ RUN systemctl mask \
|
|||||||
systemd-machine-id-commit.service
|
systemd-machine-id-commit.service
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
ENTRYPOINT [ "tini", "--" ]
|
||||||
|
|
||||||
STOPSIGNAL SIGRTMIN+3
|
CMD ["/bin/bash"]
|
||||||
CMD ["/sbin/init"]
|
|
||||||
|
|
||||||
#ENTRYPOINT ["/bin/bash"]
|
#ENTRYPOINT ["/bin/bash"]
|
||||||
|
@ -12,19 +12,41 @@ RUN dnf install -y epel-release && \
|
|||||||
systemd \
|
systemd \
|
||||||
livecd-tools \
|
livecd-tools \
|
||||||
pykickstart \
|
pykickstart \
|
||||||
|
glibc-langpack-en \
|
||||||
grub2-efi-*64 \
|
grub2-efi-*64 \
|
||||||
grub2-efi-*64-cdboot \
|
grub2-efi-*64-cdboot \
|
||||||
shim-*64 ; \
|
shim-*64 \
|
||||||
|
# Optional includes -- starts
|
||||||
|
jq \
|
||||||
|
tar \
|
||||||
|
libblockdev-mdraid \
|
||||||
|
libblockdev-crypto \
|
||||||
|
libblockdev-lvm \
|
||||||
|
libblockdev-dm \
|
||||||
|
libblockdev-swap \
|
||||||
|
libblockdev-loop \
|
||||||
|
libblockdev-nvdimm \
|
||||||
|
libblockdev-mpath \
|
||||||
|
rootfiles \
|
||||||
|
# Optional includes to avoid runtime warning -- ends
|
||||||
|
; \
|
||||||
rm -rf /mnt/system-root/var/cache/* ; \
|
rm -rf /mnt/system-root/var/cache/* ; \
|
||||||
dnf clean all; \
|
dnf clean all; \
|
||||||
cp /etc/yum.repos.d/* /mnt/system-root/etc/yum.repos.d/ ; \
|
# Temp fix for dnf until fix is ported to EL8
|
||||||
|
# imgcreate.errors.MountError: Unable to unmount filesystem at /var/tmp/imgcreate-XXXXXX/install_root/var/cache/dnf.
|
||||||
|
cwd=$PWD \
|
||||||
|
cd /mnt/system-root/usr/lib/python3.6/site-packages/dnf/ ;\
|
||||||
|
mv base.py base.py_saved ;\
|
||||||
|
curl -LO https://raw.githubusercontent.com/AlmaLinux/sig-livemedia/build-fix/work/scripts/base.py ; \
|
||||||
|
cd $cwd ; \
|
||||||
|
# cp /etc/yum.repos.d/e* /mnt/system-root/etc/yum.repos.d/ ; \
|
||||||
/bin/date +%Y%m%d_%H%M > /mnt/system-root/etc/BUILDTIME ;\
|
/bin/date +%Y%m%d_%H%M > /mnt/system-root/etc/BUILDTIME ;\
|
||||||
# set DNF infra variable to container for compatibility with CentOS
|
# set DNF infra variable to container for compatibility with CentOS
|
||||||
echo 'container' > /mnt/system-root/etc/dnf/vars/infra; \
|
# echo 'container' > /mnt/system-root/etc/dnf/vars/infra; \
|
||||||
# install only en_US.UTF-8 locale files, see
|
# install only en_US.UTF-8 locale files, see
|
||||||
# https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging for details
|
# https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging for details
|
||||||
echo '%_install_langs en_US.UTF-8' > /mnt/system-root/etc/rpm/macros.image-language-conf; \
|
# echo '%_install_langs en_US.UTF-8' > /mnt/system-root/etc/rpm/macros.image-language-conf; \
|
||||||
echo 'LANG="C.utf8"' > /etc/locale.conf; \
|
echo 'LANG="en_US.UTF-8"' > /etc/locale.conf; \
|
||||||
touch /mnt/system-root/etc/machine-id; \
|
touch /mnt/system-root/etc/machine-id; \
|
||||||
rm -rf /var/cache/yum;
|
rm -rf /var/cache/yum;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user