pikaur_builder/Dockerfile
Blallo 25c8b1ec31
Some checks failed
continuous-integration/drone/push Build is failing
Use non root image
2021-02-21 00:39:44 +01:00

31 lines
741 B
Docker

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} doer; fi \
&& useradd -u ${uid} -g ${gid} -m -d /doer doer \
&& pacman -Sy --noconfirm \
base-devel \
glibc \
git \
sudo \
python-commonmark \
pyalpm \
&& chmod 600 /etc/sudoers \
&& sed -i"" '/root ALL.*/a doer ALL=(ALL) NOPASSWD:ALL' /etc/sudoers \
&& chmod 440 /etc/sudoers
VOLUME ["/var/lib/pacman", "/var/cache/pacman"]
USER doer
WORKDIR /doer
RUN git clone https://aur.archlinux.org/pikaur.git \
&& cd pikaur \
&& makepkg -fsri --noconfirm
ENTRYPOINT ["/usr/bin/pikaur"]
CMD []