Help me build it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
698 B

FROM archlinux:latest
ARG uid=1000
ARG gid=33
RUN CHECK_GROUP=$(cat /etc/group|awk -F: '{print $3}'|egrep "^${gid}$"|wc -l) \
&& if [ $CHECK_GROUP -eq 0 ]; then groupadd -g ${gid} build; fi \
&& useradd -u ${uid} -g ${gid} -m -d /build build \
&& pacman -Sy --noconfirm \
base-devel \
glibc \
git \
sudo \
python-commonmark \
pyalpm \
&& chmod 600 /etc/sudoers \
&& sed -i"" '/root ALL.*/a build ALL=(ALL) NOPASSWD:ALL' /etc/sudoers \
&& chmod 440 /etc/sudoers
USER build
WORKDIR /build
RUN git clone https://aur.archlinux.org/pikaur.git \
&& cd pikaur \
&& makepkg -fsri --noconfirm
ENTRYPOINT ["/usr/bin/pikaur"]
CMD []