when multiple kernels and initrds exist, use the latest

This commit is contained in:
edgood1
2025-03-02 12:44:55 +01:00
committed by Adphi
parent d8ee37833e
commit dfd4d7dd43
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -71,8 +71,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cr
# needs to be after update-initramfs # needs to be after update-initramfs
{{- if not .Grub }} {{- if not .Grub }}
RUN mv $(find /boot -name 'vmlinuz-*') /boot/vmlinuz && \ RUN mv $(ls -t /boot/vmlinuz-* | head -n 1) /boot/vmlinuz && \
mv $(find /boot -name 'initrd.img-*') /boot/initrd.img mv $(ls -t /boot/initrd.img-* | head -n 1) /boot/initrd.img
{{- end }} {{- end }}
RUN apt-get clean && \ RUN apt-get clean && \
+2 -2
View File
@@ -62,8 +62,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cr
# needs to be after update-initramfs # needs to be after update-initramfs
{{- if not .Grub }} {{- if not .Grub }}
RUN mv $(find /boot -name 'vmlinuz-*') /boot/vmlinuz && \ RUN mv $(ls -t /boot/vmlinuz-* | head -n 1) /boot/vmlinuz && \
mv $(find /boot -name 'initrd.img-*') /boot/initrd.img mv $(ls -t /boot/initrd.img-* | head -n 1) /boot/initrd.img
{{- end }} {{- end }}
RUN apt-get clean && \ RUN apt-get clean && \