FROM localhost/archlinux:fullbase

COPY root/etc /etc
COPY builder.pgp.pub /

RUN pacman --disable-sandbox -Sy --noconfirm archlinux-keyring
RUN pacman --disable-sandbox -Suy --noconfirm

RUN pacman-key -a /builder.pgp.pub
RUN rm -vf /builder.pgp.pub /etc/os-release

RUN pacman --disable-sandbox -Sy
RUN pacman --disable-sandbox -Rdd --noconfirm systemd systemd-libs systemd-sysvcompat base
RUN pacman --disable-sandbox -S --noconfirm halt-ubase-git sinit-spark sinit-sysvcompat sinit-tools spark-etc spark-rc ssm ssm-service ssm-services-git systemd-dummy udev-dummy systemd-libs-systemd systemd-libs-udev

RUN rm -vf /var/cache/pacman/pkg/*
RUN pacman --disable-sandbox -Scc --noconfirm
