# Copyright 2024 Foster Hangdaan # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. 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"]