This commit is contained in:
Balakrishnan Balasubramanian 2025-02-09 15:08:42 -05:00
parent 4c252f24e8
commit 66ae675684
2 changed files with 21 additions and 3 deletions

View File

@ -3,17 +3,19 @@ FROM docker.io/archlinux:base-devel
LABEL Description="Container to build archlinux packages"
COPY packager.conf /etc/makepkg.conf.d/packager.conf
COPY mirrorlist /etc/pacman.d/mirrorlist
COPY sudoers /etc/sudoers.d/builder
COPY run.sh /run.sh
RUN echo "169.254.1.2 archmirror.i.balki.me" >> /etc/hosts
# RUN echo "169.254.1.2 archmirror.i.balki.me" >> /etc/hosts
RUN pacman -Sy --noconfirm git
COPY mirrorlist /etc/pacman.d/mirrorlist
RUN useradd builder -m
WORKDIR /w
USER builder
CMD sudo pacman -Syu && makepkg --printsrcinfo > .SRCINFO && makepkg -s
CMD /run.sh

16
run.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -xeuo pipefail
# sudo sed -i '$ a 169.254.1.2 archmirror.i.balki.me' /etc/hosts
sudo sh -c 'echo "169.254.1.2 archmirror.i.balki.me" >> /etc/hosts'
sudo pacman -Syu
sudo chown --recursive builder:builder /w
makepkg --printsrcinfo > .SRCINFO
makepkg -s