mirror of
https://github.com/AlmaLinux/ks2rootfs.git
synced 2024-11-24 10:13:08 +00:00
Fix script align to docker-images build.sh
Signed-off-by: Bala Raman <srbala@gmail.com>
This commit is contained in:
parent
7ce5dcb59a
commit
88dd5022a7
10
Dockerfile
10
Dockerfile
@ -4,7 +4,7 @@
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
FROM almalinux:8 as builder
|
FROM almalinux:8 as builder
|
||||||
|
|
||||||
RUN mkdir -p /mnt/system-root /mnt/system-root/build; \
|
RUN mkdir -p /mnt/system-root /mnt/system-root/build /mnt/system-root/run/lock; \
|
||||||
dnf install --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y coreutils-single \
|
dnf install --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y coreutils-single \
|
||||||
bash \
|
bash \
|
||||||
glibc-minimal-langpack \
|
glibc-minimal-langpack \
|
||||||
@ -14,6 +14,7 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build; \
|
|||||||
jq \
|
jq \
|
||||||
tar \
|
tar \
|
||||||
policycoreutils \
|
policycoreutils \
|
||||||
|
pykickstart \
|
||||||
# Optional include to avoid runtime warning -- starts
|
# Optional include to avoid runtime warning -- starts
|
||||||
libblockdev-mdraid \
|
libblockdev-mdraid \
|
||||||
libblockdev-crypto \
|
libblockdev-crypto \
|
||||||
@ -24,7 +25,8 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build; \
|
|||||||
libblockdev-nvdimm \
|
libblockdev-nvdimm \
|
||||||
libblockdev-mpath \
|
libblockdev-mpath \
|
||||||
# Optional include to avoid runtime warning -- ends
|
# Optional include to avoid runtime warning -- ends
|
||||||
rootfiles; \
|
rootfiles \
|
||||||
|
util-linux-ng; \
|
||||||
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/ ; \
|
cp /etc/yum.repos.d/* /mnt/system-root/etc/yum.repos.d/ ; \
|
||||||
@ -36,8 +38,8 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build; \
|
|||||||
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; \
|
||||||
touch /mnt/system-root/etc/machine-id
|
touch /mnt/system-root/etc/machine-id;
|
||||||
|
|
||||||
COPY scripts/ /mnt/system-root/usr/bin
|
COPY scripts/ /mnt/system-root/usr/bin
|
||||||
|
|
||||||
|
@ -136,9 +136,9 @@ if [ ${BUILD_FLAG_WRITE_META} == 'true' ]; then
|
|||||||
echo "$distro_release" > ${BUILD_OUTDIR}/distro-release
|
echo "$distro_release" > ${BUILD_OUTDIR}/distro-release
|
||||||
fi
|
fi
|
||||||
# save list of packages installed
|
# save list of packages installed
|
||||||
jq .[] -r /tmp/dnf.cache/tempfiles.json | awk -F '/' '{print $5}' | sort > ${BUILD_OUTDIR}/pkgs-list-rpm
|
jq .[] -r /tmp/dnf.cache/tempfiles.json | awk -F '/' '{print $5}' | sort > ${BUILD_OUTDIR}/rpm-packags
|
||||||
cat ${BUILD_OUTDIR}/pkgs-list-rpm | sed 's/-[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list-only
|
# cat ${BUILD_OUTDIR}/rpm-packags | sed 's/-[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list-only
|
||||||
cat ${BUILD_OUTDIR}/pkgs-list-rpm | sed 's/.el[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list
|
# cat ${BUILD_OUTDIR}/rpm-packags | sed 's/.el[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list
|
||||||
echo 'Writting meta data completed.'
|
echo 'Writting meta data completed.'
|
||||||
else
|
else
|
||||||
echo 'Skip writing meta data based on configuration.'
|
echo 'Skip writing meta data based on configuration.'
|
||||||
|
Loading…
Reference in New Issue
Block a user