FROM alt:sisyphus # Trace execution. SHELL ["/bin/bash", "-xec"] ENV UPDATE_KERNEL_SYS_FLAVOUR=std-def ARG branch=sisyphus ARG repo=http://ftp.altlinux.org/pub/distributions/archive/$branch/date ARG a=2022/05/19 ARG b=2022/06/12 # Initialize the system and start from some arbitrary date. # update-kernel is installed just for dependencies. RUN \ echo "rpm $repo/$a/ x86_64 classic" > /etc/apt/sources.list && \ echo "rpm $repo/$a/ noarch classic" >> /etc/apt/sources.list && \ rm /etc/apt/sources.list.d/*.list && \ apt-get update && \ apt-get install -y update-kernel toilet dkms # Overwrite update-kernel with the local copy. # Docker will notice and rebuild if files are changed. COPY update-kernel remove-old-kernels /usr/sbin/ # Install base kernel for upgrading later. # Check if the kernel appeared. RUN toilet -w 150 First install && \ update-kernel -v -f --headers -A lkrg && \ ls -l /boot/vmlinuz /boot/vmlinuz-std-def /boot/initrd.img /boot/initrd-std-def.img && \ ls -l /boot/$(readlink /boot/vmlinuz) # Second call should succeed not installing anything, thus # no -f for it to fail if it will try to install something. RUN update-kernel -v -t std-def # Forward to some future. RUN \ echo "rpm $repo/$b/ x86_64 classic" > /etc/apt/sources.list && \ echo "rpm $repo/$b/ noarch classic" >> /etc/apt/sources.list && \ apt-get update # Update kernel. RUN toilet Upgrading && \ update-kernel -v -f && \ update-kernel -v -l && \ ls -la /boot RUN remove-old-kernels --all --verbose --force COPY analyze-kmodules /usr/sbin/ # There now should be two kernels.