mirror of
https://github.com/AlmaLinux/ks2rootfs.git
synced 2024-11-23 01:53:08 +00:00
Scripts fixes and enhancements
Signed-off-by: Bala Raman <srbala@gmail.com>
This commit is contained in:
parent
7d37b02470
commit
3019472862
@ -39,6 +39,7 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build /mnt/system-root/run/lock;
|
||||
# install only en_US.UTF-8 locale files, see
|
||||
# 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 'LANG="C.UTF-8"' > /etc/locale.conf; \
|
||||
touch /mnt/system-root/etc/machine-id;
|
||||
|
||||
COPY scripts/ /mnt/system-root/usr/bin
|
||||
|
@ -4,21 +4,28 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
FROM almalinux:8 as builder
|
||||
|
||||
RUN dnf install -y epel-release elrepo-release && \
|
||||
dnf upgrade -y && \
|
||||
mkdir -p /mnt/system-root /mnt/system-root/code; \
|
||||
dnf install --enablerepo="powertools" --enablerepo="epel" --enablerepo="elrepo" --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y \
|
||||
RUN dnf install -y epel-release && \
|
||||
# dnf upgrade -y && \
|
||||
mkdir -p /mnt/system-root /mnt/system-root/build; \
|
||||
dnf install --enablerepo="powertools" --enablerepo="epel" --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 ; \
|
||||
grub2-efi-*64 \
|
||||
grub2-efi-*64-cdboot \
|
||||
shim-*64 ; \
|
||||
rm -rf /mnt/system-root/var/cache/* ; \
|
||||
dnf clean all; \
|
||||
cp /etc/yum.repos.d/* /mnt/system-root/etc/yum.repos.d/ ; \
|
||||
/bin/date +%Y%m%d_%H%M > /mnt/system-root/etc/BUILDTIME ;\
|
||||
# set DNF infra variable to container for compatibility with CentOS
|
||||
echo 'container' > /mnt/system-root/etc/dnf/vars/infra; \
|
||||
# install only en_US.UTF-8 locale files, see
|
||||
# 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 'LANG="C.utf8"' > /etc/locale.conf; \
|
||||
touch /mnt/system-root/etc/machine-id; \
|
||||
rm -rf /var/cache/yum;
|
||||
|
||||
# Create Final image from scratch for ks2rootfs
|
||||
@ -26,6 +33,21 @@ FROM scratch
|
||||
|
||||
COPY --from=builder /mnt/system-root/ /
|
||||
|
||||
WORKDIR /code
|
||||
# systemd-udev-trigger.service \
|
||||
# systemd-udevd.service \
|
||||
# systemd-random-seed.service \
|
||||
# systemd-remount-fs.service \
|
||||
#sys-fs-fuse-connections.mount \
|
||||
RUN systemctl mask \
|
||||
dev-hugepages.mount \
|
||||
systemd-logind.service \
|
||||
getty.target \
|
||||
console-getty.service \
|
||||
systemd-machine-id-commit.service
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
WORKDIR /build
|
||||
|
||||
STOPSIGNAL SIGRTMIN+3
|
||||
CMD ["/sbin/init"]
|
||||
|
||||
#ENTRYPOINT ["/bin/bash"]
|
||||
|
@ -64,7 +64,7 @@ TYPE='default'
|
||||
|
||||
USE_PWD_OUTPUT=${USE_PWD_OUTPUT:-false}
|
||||
|
||||
OUTPUT_DIR=${OUTPUT_DIR:-result}
|
||||
OUTPUT_DIR=${OUTPUT_PREFIX:-result}_$(uname -m)
|
||||
BUILD_LOGDIR=${OUTPUT_DIR}/logs
|
||||
|
||||
if [ ${FLAG_OUTOUT_IN_PWD} == 'true' ]; then
|
||||
@ -97,7 +97,7 @@ case "${BUILD_TYPE}" in
|
||||
esac
|
||||
|
||||
if [ ${TYPE} == 'wsl' ]; then
|
||||
BUILD_COMPTYPE = 'gzip'
|
||||
BUILD_COMPTYPE='gzip'
|
||||
fi
|
||||
|
||||
BUILD_LOGDIR=${OUTPUT_DIR}/logs
|
||||
|
Loading…
Reference in New Issue
Block a user