47 lines
2.1 KiB
Docker
47 lines
2.1 KiB
Docker
# 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 <http://www.gnu.org/licenses/>.
|
|
|
|
FROM docker.io/library/archlinux:base-devel
|
|
|
|
LABEL org.opencontainers.image.title="Arch Packaging Container"
|
|
LABEL org.opencontainers.image.description="An isolated environment for building Arch Linux packages."
|
|
LABEL org.opencontainers.image.authors="Foster Hangdaan <foster@hangdaan.email>"
|
|
LABEL org.opencontainers.image.url="https://code.fosterhangdaan.com/foster/arch-packaging-container/src/branch/trunk/README.org"
|
|
LABEL org.opencontainers.image.documentation="https://code.fosterhangdaan.com/foster/arch-packaging-container/wiki"
|
|
LABEL org.opencontainers.image.source="https://code.fosterhangdaan.com/foster/arch-packaging-container"
|
|
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later"
|
|
|
|
RUN set -ex && \
|
|
pacman -Sy && \
|
|
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
|
|
|
|
USER builder
|
|
|
|
WORKDIR /pkg
|
|
|
|
VOLUME ["/pkg", "/build"]
|
|
|
|
ENTRYPOINT ["/usr/bin/makepkg"]
|
|
|
|
CMD ["--syncdeps", "--noconfirm"]
|