Created
March 14, 2024 09:14
-
-
Save glostis/c8bcde5ff3bf91b1ffa1fb4bbe930463 to your computer and use it in GitHub Desktop.
Dockerfile based on Archlinux with `yay` installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM archlinux | |
# Need to create a non-root user, otherwise `makepkg` refuses to work | |
RUN useradd --no-create-home --shell=/bin/false build && usermod -L build | |
RUN echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
RUN pacman -Syu --noconfirm && pacman -S --noconfirm sudo | |
USER build | |
WORKDIR /home/build | |
RUN sudo pacman -S --needed --noconfirm git base-devel && \ | |
git clone https://aur.archlinux.org/yay-bin.git && \ | |
cd yay-bin && \ | |
makepkg -si --noconfirm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment