Files
euri-iso/Containerfile
T
c-ludenberg 76e1bb1fc1 feat(build): containerize ISO builds for non-pacman distros
this is a commit message. it is a MANIFESTO for no reason. i am aware.
it is 17:38. i am in pain. the pain is optional. the commit is not.

so. context, because i know you need it:
i installed gentoo to see what happens. what happened: emerge. days of
emerge. portage asked me to rebuild itself mid-rebuild and i said yes
because i was scared of what it'd do if i said no. my ext4 drive died
AGAIN so we're btrfs. snapshots are now my emergency contacts.
(profile update pending: "Used Gentoo BTW" -> "Used Gentoo and it
used me")

THE ACTUAL CHANGES (finally):
- artools is bash + pacman. it is not sacred. it is now a CONTAINER
- Containerfile: artix base, artools + squashfs-tools + xorriso +
  mkinitcpio, repo buildiso as ENTRYPOINT (the --overwrite='*' one.
  the other one knows what it did), antergos-pkgs pacman.conf baked in
- .dockerignore so podman users don't download 33MB of my .git and
  learn things about me

devtmpfs requires rootful podman. i am not explaining why. the answer
is "devtmpfs is a coward." i am the maintainer. i am allowed to say
that. rootless? you're not building an ISO, you're building a support
system for your decisions. anyway.

- build-iso-podman.sh exists so i can stop pasting commands from the
  README into my own terminal like a tourist
- README now has: podman for non-pacman (gentoo fedora debian), native
  for arch/artix/kaos, and a TABLE. i made a TABLE. i am healing.
- it works on any distro with podman because i want you to suffer LESS
  than me. that is not altruism. it is spite with a benefit package.

so laugh all you want. forget about me all you want. but at least i'll
be gorgeous forever. this is the longest i've committed to anything
since gentoo. and i regret BOTH of those decisions.

Signed-off-by: Michał <ash8820@proton.me>
2026-08-15 17:38:30 +00:00

57 lines
2.1 KiB
Docker

# Antergos NeXT ISO build container
#
# Build an Antergos NeXT ISO inside an Artix Linux container. This is the
# same path GitHub Actions uses, so anyone can produce a release ISO without
# running an Artix/Arch system (works on Gentoo, Fedora, anything with podman).
#
# Usage:
# podman build -t antergos-build .
# podman run --rm --privileged \
# -v /var/lib/artools-buildiso:/var/lib/artools/buildiso \
# -v "$(pwd)/iso-output:/workspace/iso-output" \
# -e WORKSPACE_DIR=/workspace \
# antergos-build
#
# --privileged is required: artools' chroot (via basestrap) mounts devtmpfs,
# proc and sysfs into the target, which rootless containers cannot do.
#
# The finished ISO is written to /workspace/iso-output (bind-mounted above).
FROM docker.io/artixlinux/artixlinux:base
ENV INITSYS=dinit \
WORKSPACE_DIR=/workspace \
CHROOTS_DIR=/var/lib/artools
# Full dependency set for an ISO build: artools (base + iso tools), squashfs
# for the .sfs layers, mkinitcpio for the initramfs, grub + xorriso for the
# bootable image, git/python for CI tooling and the Internet Archive uploader.
RUN pacman -Syu --noconfirm --needed --overwrite='*' \
artools \
git \
squashfs-tools \
sudo \
python \
python-pip \
xorriso \
dosfstools \
syslinux \
gptfdisk \
mtools
# This repo's buildiso and profiles become the default build payload. Mounting
# a live checkout over /workspace at runtime replaces these with the user's copy.
WORKDIR /workspace
COPY . .
# Point artools at the Antergos package repository. CI copies the profile's
# pacman.conf into both the user config dir (first match) and artools' defaults.
RUN mkdir -p /root/.config/artools/pacman.conf.d \
&& cp pacman.conf.d/iso-x86_64.conf /root/.config/artools/pacman.conf.d/iso-x86_64.conf \
&& cp pacman.conf.d/iso-x86_64.conf /usr/share/artools/pacman.conf.d/iso-x86_64.conf
# The modified buildiso lives in this repo and must be used instead of
# /usr/bin/buildiso (which lacks --overwrite='*').
ENTRYPOINT ["/workspace/buildiso"]
CMD ["-p", "antergos"]