diff --git a/templates/debian.Dockerfile b/templates/debian.Dockerfile index 5d8b036..0443523 100644 --- a/templates/debian.Dockerfile +++ b/templates/debian.Dockerfile @@ -71,8 +71,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cr # needs to be after update-initramfs {{- if not .Grub }} -RUN mv $(find /boot -name 'vmlinuz-*') /boot/vmlinuz && \ - mv $(find /boot -name 'initrd.img-*') /boot/initrd.img +RUN mv $(ls -t /boot/vmlinuz-* | head -n 1) /boot/vmlinuz && \ + mv $(ls -t /boot/initrd.img-* | head -n 1) /boot/initrd.img {{- end }} RUN apt-get clean && \ diff --git a/templates/ubuntu.Dockerfile b/templates/ubuntu.Dockerfile index 1589379..f5db285 100644 --- a/templates/ubuntu.Dockerfile +++ b/templates/ubuntu.Dockerfile @@ -62,8 +62,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cr # needs to be after update-initramfs {{- if not .Grub }} -RUN mv $(find /boot -name 'vmlinuz-*') /boot/vmlinuz && \ - mv $(find /boot -name 'initrd.img-*') /boot/initrd.img +RUN mv $(ls -t /boot/vmlinuz-* | head -n 1) /boot/vmlinuz && \ + mv $(ls -t /boot/initrd.img-* | head -n 1) /boot/initrd.img {{- end }} RUN apt-get clean && \