# Arch Packaging Container - An isolated environment for building Arch Linux packages. # Copyright (C) 2024 Foster Hangdaan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . FROM docker.io/library/archlinux:base-devel MAINTAINER Foster Hangdaan RUN set -ex && \ pacman -Syy --noconfirm --needed git && \ useradd --create-home builder && \ echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder && \ echo "BUILDDIR=/build/app/" >> /home/builder/.makepkg.conf && \ echo "PKGDEST=/build/packages/" >> /home/builder/.makepkg.conf && \ echo "SRCDEST=/build/sources/" >> /home/builder/.makepkg.conf && \ echo "SRCPKGDEST=/build/srcpackages/" >> /home/builder/.makepkg.conf && \ echo "LOGDEST=/build/logs/" >> /home/builder/.makepkg.conf && \ mkdir -p /pkg /build && \ chown -R builder:builder /build && \ rm -rf /var/cache/pacman/pkg/ ~/.cache/ USER builder WORKDIR /pkg VOLUME ["/pkg", "/build"] ENTRYPOINT ["/usr/bin/makepkg"] CMD ["--syncdeps", "--noconfirm"]