mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2026-01-10 20:01:03 +01:00
24 lines
956 B
Docker
24 lines
956 B
Docker
FROM archlinux:latest AS verify
|
|
COPY TEMPLATE_ROOTFS_FILE /
|
|
SHELL ["/bin/bash", "-c"]
|
|
RUN ROOTFS="$(curl --continue-at - --remote-name --write-out "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \
|
|
sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \
|
|
mkdir /rootfs && \
|
|
tar -C /rootfs --extract --auto-compress --file "${ROOTFS}"
|
|
|
|
FROM scratch AS root
|
|
COPY --from=verify /rootfs/ /
|
|
|
|
# manually run all alpm hooks that can't be run inside the fakechroot
|
|
RUN ldconfig && update-ca-trust && locale-gen
|
|
RUN sh -c 'ls usr/lib/sysusers.d/*.conf | /usr/share/libalpm/scripts/systemd-hook sysusers '
|
|
|
|
# update /etc/os-release
|
|
RUN ln -s /usr/lib/os-release /etc/os-release
|
|
|
|
# initialize the archlinux keyring, but discard any private key that may be shipped.
|
|
RUN pacman-key --init && pacman-key --populate archlinux && bash -c "rm -rf etc/pacman.d/gnupg/{openpgp-revocs.d/,private-keys-v1.d/,pubring.gpg~,gnupg.S.}*"
|
|
|
|
ENV LANG=en_US.UTF-8
|
|
CMD ["/usr/bin/bash"]
|