Files
archery/docker/Dockerfile.arch
Cory Sanin d14ccdf939
All checks were successful
App Image CI / Build app image (push) Successful in -1m15s
Docker Image CI / Build build images (arch) (push) Successful in 1s
Docker Image CI / Build build images (artix) (push) Successful in -34s
NPM Audit Check / Check NPM audit (push) Successful in -2m9s
define custom mirror at runtime
2025-11-12 01:30:57 -05:00

25 lines
853 B
Docker

FROM archlinux/archlinux:base-devel
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
COPY scripts/pacman.conf.arch/pacman.conf.pl /scripts/pacman.conf.pl
ARG BUILDMIRROR=https://mirror.sanin.dev/arch-linux/\$repo/os/\$arch
RUN cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak && \
sed -i "1iServer = $BUILDMIRROR" /etc/pacman.d/mirrorlist && \
pacman -Syu --noconfirm git clang sudo devtools vim bash-completion && \
pacman -Scc --noconfirm && \
rm -rf /var/lib/pacman/sync /var/cache/pacman/pkg && \
mv /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist && \
git config --global init.defaultBranch "master" && \
chmod +x /scripts/* && \
useradd -m user && \
echo "user:pass-$RANDOM" | chpasswd && \
echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER user
WORKDIR /home/user/
CMD [ "/scripts/entrypoint.sh" ]