Files
pkgmgr/Dockerfile
Kevin Veen-Birkenbach 6fee6f27ee Fix PKGBUILD source handling and Docker build context
This commit removes unnecessary source entries from PKGBUILD
to allow full local-tree packaging through prepare(), and updates
the Dockerfile to copy the entire repository and install rsync
for makepkg buildtime dependencies.

See conversation: https://chatgpt.com/share/6935db4e-f3e8-800f-b0ca-42f77491ef5b
2025-12-07 20:54:04 +01:00

31 lines
724 B
Docker

FROM archlinux:latest
# 1) System basis + Nix
RUN pacman -Syu --noconfirm \
&& pacman -S --noconfirm --needed \
base-devel \
git \
nix \
rsync \
&& pacman -Scc --noconfirm
# 2) Unprivileged user for building Arch packages
RUN useradd -m builder
WORKDIR /build
# 3) Only PKGBUILD rein, um dein Wrapper-Paket zu bauen
COPY . .
RUN chown -R builder:builder /build \
&& su builder -c "makepkg -s --noconfirm --clean" \
&& pacman -U --noconfirm package-manager-*.pkg.tar.* \
&& rm -rf /build
# 4) Projekt-Quellen für Tests in den Container kopieren
WORKDIR /src
COPY . .
# pkgmgr (Arch-Package) ist installiert und ruft nix run auf.
ENTRYPOINT ["pkgmgr"]
CMD ["--help"]