build: allow to build the package in a clean container.

This commit is contained in:
Alexandre Pujol 2022-10-04 23:17:11 +01:00
parent 027a506eec
commit fa1f71a151
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
4 changed files with 159 additions and 0 deletions

View file

@ -0,0 +1,13 @@
FROM archlinux:base-devel
RUN pacman -Syu --noconfirm --noprogressbar --quiet \
devtools git pacman-contrib \
go git rsync lsb-release && \
paccache -r -k 0 && \
pacman -Rscn --noconfirm --noprogressbar pacman-contrib && \
useradd -m -s /bin/bash -u 1000 build && \
echo "build ALL=NOPASSWD: ALL" >> /etc/sudoers && \
chown -R build:build /home/build
USER build
CMD ["/bin/bash"]