diff --git a/images/static-images/x86_64/archlinux/5.18/Dockerfile b/images/static-images/x86_64/archlinux/5.18/Dockerfile new file mode 100644 index 0000000..d783ff0 --- /dev/null +++ b/images/static-images/x86_64/archlinux/5.18/Dockerfile @@ -0,0 +1,30 @@ +FROM archlinux:base + +WORKDIR /home/ubuntu + +RUN echo 'Server=https://archive.archlinux.org/repos/2022/08/04/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ +pacman -Syyu --noconfirm && \ + pacman -S --noconfirm \ + bpf \ + clang \ + cmake \ + gcc \ + git \ + libcap \ + linux-headers \ + llvm \ + make \ + openssh \ + python \ + rsync \ + wget && \ + yes | pacman -Scc && \ + ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ + echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ + locale-gen && \ + echo 'LANG=en_US.UTF-8' > /etc/locale.conf && \ + echo 'archlinux' > /etc/hostname && \ + systemctl enable sshd && \ + sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ + echo 'UseDNS no' >> /etc/ssh/sshd_config && \ + echo "root:root" | chpasswd diff --git a/images/static-images/x86_64/archlinux/5.18/Dockerfile.kernel b/images/static-images/x86_64/archlinux/5.18/Dockerfile.kernel new file mode 100644 index 0000000..40cf0c5 --- /dev/null +++ b/images/static-images/x86_64/archlinux/5.18/Dockerfile.kernel @@ -0,0 +1,29 @@ +ARG VERSION +ARG URL +ARG ARCH + +FROM initrd-builder:0.0.1 AS builder + +ARG VERSION=linux-5.18.16.arch1-1 +ARG URL='https://archive.archlinux.org/packages/l' +ARG ARCH=x86_64 + +WORKDIR /home/ubuntu + +RUN touch .placeholder && \ + curl -Lo kernel.pkg.tar.zst ${URL}/linux/linux-${VERSION}-${ARCH}.pkg.tar.zst && \ + curl -Lo headers.pkg.tar.zst ${URL}/linux-headers/linux-headers-${VERSION}-${ARCH}.pkg.tar.zst && \ + mkdir extracted && \ + cd extracted && \ + ls ../*.tar.zst | \ + xargs -I@ tar -xaf @ && \ + find . -name '*.zst' -exec zstd -d --rm -f {} \; && \ + mv ./usr/lib . && \ + extract-vmlinux $(find . -name 'vmlinux') > vmlinux && \ + /opt/initrd-builder/create.sh + +FROM scratch + +COPY --from=builder /home/ubuntu/extracted/vmlinux /boot/ +COPY --from=builder /home/ubuntu/out/initrd /boot/ +COPY --from=builder /home/ubuntu/.placeholder /lib/modules/