parchlinux-docker/Dockerfile.template

31 lines
1.3 KiB
Text

FROM alpine:3.22 AS verify
COPY TEMPLATE_ROOTFS_FILE /
RUN apk add --no-cache curl tar zstd
RUN TEMPLATE_ROOTFS_DOWNLOAD && \
echo "TEMPLATE_ROOTFS_HASH" > /tmp/sha256sums.txt && \
sha256sum -c /tmp/sha256sums.txt && \
mkdir /rootfs && \
tar -C /rootfs --extract --file TEMPLATE_ROOTFS_FILE
FROM scratch AS root
LABEL org.opencontainers.image.title="TEMPLATE_TITLE"
LABEL org.opencontainers.image.description="Official containerd image of Arch Linux, a simple, lightweight Linux distribution aimed for flexibility."
LABEL org.opencontainers.image.authors="Amir Husayn Panahifar <ahp@panahifar.ir> (@ahp)"
LABEL org.opencontainers.image.url="https://git.parchlinux.org/ahp/parchlinux-docker/-/blob/main/README.md"
LABEL org.opencontainers.image.documentation="https://wiki.parchlinux.org/title/Docker#Parch_Linux"
LABEL org.opencontainers.image.source="https://git.parchlinux.org/ahp/parchlinux-docker"
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later"
LABEL org.opencontainers.image.version="TEMPLATE_VERSION_ID"
LABEL org.opencontainers.image.revision="TEMPLATE_REVISION"
LABEL org.opencontainers.image.created="TEMPLATE_CREATED"
COPY --from=verify /rootfs/ /
# RUN ldconfig && \
# sed -i '/BUILD_ID/a VERSION_ID=TEMPLATE_VERSION_ID' /etc/os-release
ENV LANG=C.UTF-8
CMD ["/usr/bin/bash"]