diff --git a/Dockerfile b/Dockerfile index d30d20b..d16ecea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,71 @@ #FROM ghcr.io/fwcd/archlinux:latest AS bootstrap -FROM azathothas/archlinux:latest AS bootstrap +FROM pkgforge/archlinux:latest AS bootstrap +#------------------------------------------------------------------------------------# +##Build Args ARG TARGETARCH ARG TARGETVARIANT +#------------------------------------------------------------------------------------# -# Set up the bootstrap tree +#------------------------------------------------------------------------------------# +##Bootstrap COPY /bootstrap/any / COPY /bootstrap/${TARGETARCH}${TARGETVARIANT} / - -# Set up the initial rootfs tree COPY /rootfs/any /rootfs COPY /rootfs/${TARGETARCH}${TARGETVARIANT} /rootfs +#------------------------------------------------------------------------------------# -# Install the base packages -RUN cat /etc/bootstrap-packages.txt | xargs pacstrap-docker /rootfs +#------------------------------------------------------------------------------------# +##Install the base packages +RUN cat /etc/bootstrap-packages.txt | xargs pacstrap-docker /rootfs 2>/dev/null +#------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------# +##Fixes # Fix marginal trust errors on Arch Linux ARM -RUN sed -i 's/^\(GPG_PACMAN=(.*\))/\1 --allow-weak-key-signatures)/g' /rootfs/usr/bin/pacman-key - -# Remove the current pacman database (usually outdated very soon anyway) -RUN rm /rootfs/var/lib/pacman/sync/* +RUN </dev/null || true + rm /rootfs/var/lib/pacman/sync/* 2>/dev/null || true + sed 's/DownloadUser/#DownloadUser/g' -i "/etc/pacman.conf" 2>/dev/null || true +EOS +#------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------# +##Copy the bootstrapped rootfs FROM scratch - -# Copy the bootstrapped rootfs COPY --from=bootstrap /rootfs / +#------------------------------------------------------------------------------------# -# Set up locale -ENV LANG=en_US.UTF-8 -RUN locale-gen - +#------------------------------------------------------------------------------------# +##Initialize # Set up pacman-key without distributing the lsign key # See https://gitlab.archlinux.org/archlinux/archlinux-docker/-/blob/301942f9e5995770cb5e4dedb4fe9166afa4806d/README.md#principles # Source: https://gitlab.archlinux.org/archlinux/archlinux-docker/-/blob/301942f9e5995770cb5e4dedb4fe9166afa4806d/Makefile#L22 -RUN pacman-key --init && \ - pacman-key --populate && \ - bash -c "rm -rf etc/pacman.d/gnupg/{openpgp-revocs.d/,private-keys-v1.d/,pubring.gpg~,gnupg.S.}*" +RUN </dev/null || true + pacman-key --populate 2>/dev/null || true + bash -c "rm -rf etc/pacman.d/gnupg/{openpgp-revocs.d/,private-keys-v1.d/,pubring.gpg~,gnupg.S.}*" 2>/dev/null || true + sed 's/DownloadUser/#DownloadUser/g' -i "/etc/pacman.conf" 2>/dev/null || true +EOS +#------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------# +#ENV +RUN <