2022-04-03 04:33:15 +03:00
FROM alt:sisyphus
# Trace execution.
SHELL [ "/bin/bash" , "-xec" ]
2022-04-09 10:57:03 +03:00
ENV UPDATE_KERNEL_SYS_FLAVOUR = std-def
2022-04-03 04:33:15 +03:00
ARG branch = sisyphus
ARG repo = http://ftp.altlinux.org/pub/distributions/archive/$branch /date
2022-06-19 21:17:59 +03:00
ARG a = 2022 /05/19
ARG b = 2022 /06/12
2022-04-03 04:33:15 +03:00
# 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 && \
2022-04-06 02:43:48 +03:00
apt-get install -y update-kernel toilet dkms
2022-04-03 04:33:15 +03:00
# 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 && \
2022-06-19 20:23:11 +03:00
update-kernel -v -f --headers -A lkrg && \
2022-04-03 04:33:15 +03:00
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.
2022-04-06 03:04:07 +03:00
RUN update-kernel -v -t std-def
2022-04-03 04:33:15 +03:00
# 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 && \
2022-04-09 10:57:03 +03:00
update-kernel -v -f && \
2022-04-06 03:04:07 +03:00
update-kernel -v -l && \
2022-04-03 04:33:15 +03:00
ls -la /boot
2022-06-26 02:28:14 +03:00
RUN remove-old-kernels --all --verbose --force
2022-04-10 01:28:51 +03:00
COPY analyze-kmodules /usr/sbin/
2022-04-03 04:33:15 +03:00
# There now should be two kernels.