mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2026-02-26 19:51:01 +01:00
23 lines
1.1 KiB
Docker
23 lines
1.1 KiB
Docker
FROM archlinux:latest AS verify
|
|
SHELL ["/bin/bash", "-c"]
|
|
RUN ROOTFS="$(curl --continue-at - --remote-name --write-out "%{filename_effective}" https://gitlab.archlinux.org/archlinux/archlinux-docker/uploads/8c78f3b00c369b9f1fb8b6b4e9be617b/base-20201020.6342.tar.xz)" && \
|
|
sha256sum -c <<< "00b28d7bed8425202d4f6b61373064362350db12518839bea56e3d256e281ccd base-20201020.6342.tar.xz" && \
|
|
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"]
|