mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2026-02-10 11:51:13 +01:00
27 lines
1.3 KiB
Docker
27 lines
1.3 KiB
Docker
# We're using a multistage Docker build here in order to allow us to release a self-verifying
|
|
# Docker image when built on the official Docker infrastructure.
|
|
# They require us to verify the source integrity in some way while making sure that this is a
|
|
# reproducible build.
|
|
# See https://github.com/docker-library/official-images#image-build
|
|
# In order to achieve this, we externally host the rootfs archives and their checksums and then
|
|
# just download and verify it in the first stage of this Dockerfile.
|
|
# The second stage is for actually configuring the system a little bit.
|
|
# Some templating is done in order to allow us to easily build different configurations and to
|
|
# allow us to automate the releaes process.
|
|
FROM alpine:3.12 AS verify
|
|
RUN apk add --no-cache curl bash
|
|
SHELL ["/bin/bash", "-c"]
|
|
# https://gitlab.archlinux.org/archlinux/archlinux-docker/-/releases/v20201209.0.10656
|
|
RUN ROOTFS="$(curl -sOJL --continue-at - -w "%{filename_effective}" https://gitlab.archlinux.org/archlinux/archlinux-docker/-/package_files/297/download)" && \
|
|
sha256sum -c <<< "1d7dcbe9db1fc886a433386155c8e8b8e6f196778b261b85b291a603ad542329 base-20201209.0.10656.tar.xz" && \
|
|
mkdir /rootfs && \
|
|
tar -C /rootfs --extract --file "${ROOTFS}"
|
|
|
|
FROM scratch AS root
|
|
COPY --from=verify /rootfs/ /
|
|
|
|
RUN ldconfig
|
|
|
|
ENV LANG=en_US.UTF-8
|
|
CMD ["/usr/bin/bash"]
|