2026-07-26 18:10:50 +02:00
|
|
|
FROM artixlinux/artixlinux:base-dinit
|
|
|
|
|
|
2026-07-31 16:34:41 +02:00
|
|
|
|
|
|
|
|
# Add kira-base repo
|
|
|
|
|
RUN pacman-key --init \
|
|
|
|
|
&& pacman-key --recv-keys CAF78E41A83A6D64 \
|
|
|
|
|
&& pacman-key --lsign-key CAF78E41A83A6D64 \
|
|
|
|
|
&& printf '[kira-base]\nSigLevel = Required TrustedOnly\nServer = https://repos.kira-linux.org/kira-base/x86_64\n' >> /etc/pacman.conf \
|
|
|
|
|
&& pacman -Sy
|
|
|
|
|
|
|
|
|
|
# Update system
|
|
|
|
|
RUN pacman -Suyy --noconfirm
|
|
|
|
|
|
2026-07-26 18:10:50 +02:00
|
|
|
# Install necessary build tools
|
2026-07-31 16:34:41 +02:00
|
|
|
RUN pacman -Suy --noconfirm base-devel git wget sudo make pacman-contrib binutils rust rust-bindgen rust-src libgcc graphviz imagemagick python python-sphinx python-yaml texlive-latexextra
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Clean pacman cache
|
|
|
|
|
RUN pacman -Scc
|
|
|
|
|
|
|
|
|
|
# Recieve Linus and Greg keys for linux kernel sources
|
|
|
|
|
RUN gpg --recv-keys 647F28654894E3BD457199BE38DBBDC86092693E ABAF11C65A2970B130ABE3C479BE3E4300411886
|
2026-07-26 18:10:50 +02:00
|
|
|
|
|
|
|
|
# Config to use 16 thread for building
|
|
|
|
|
RUN printf 'MAKEFLAGS="-j16"\n' > /etc/makepkg.conf.d/j16.conf
|
|
|
|
|
|
2026-07-31 16:34:41 +02:00
|
|
|
# Add packager
|
|
|
|
|
RUN printf 'PACKAGER="Build Bee <hive@kira-linux.org>"\n' > /etc/makepkg.conf.d/77-packager.conf
|
|
|
|
|
|
2026-07-26 18:10:50 +02:00
|
|
|
# Create a build user
|
|
|
|
|
RUN useradd -m builduser \
|
|
|
|
|
&& passwd -d builduser \
|
|
|
|
|
&& printf 'builduser ALL=(ALL) ALL\n' >> /etc/sudoers
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /home/builduser
|
|
|
|
|
|
|
|
|
|
# Build the package as the non-root user
|
|
|
|
|
# -s: install missing dependencies
|
|
|
|
|
# -c: clean build directory after successful build
|
|
|
|
|
# --noconfirm: auto-confirm prompts
|
|
|
|
|
USER builduser
|
|
|
|
|
|
|
|
|
|
# Do NOT copy source code or run makepkg here.
|
|
|
|
|
# Leave the container ready to accept any mounted directory.
|
|
|
|
|
CMD ["bash"]
|
|
|
|
|
|