Skip to content

Instantly share code, notes, and snippets.

@cerebrate
Created June 25, 2022 17:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cerebrate/45daae1bf6ad82ecd041d347bd2b1173 to your computer and use it in GitHub Desktop.
FROM archlinux:base-devel
LABEL org.opencontainers.image.authors="avatar@arkane-systems.net"
RUN pacman -Syu --noconfirm pacman-contrib git
# makepkg user and workdir
ARG pkguser=makepkg
RUN useradd --system --create-home $pkguser \
&& echo "$pkguser ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$pkguser
USER $pkguser
WORKDIR /home/$pkguser
# Install yay
RUN git clone https://aur.archlinux.org/yay.git \
&& cd yay \
&& makepkg -sri --needed --noconfirm \
&& cd \
# Clean up
&& rm -rf .cache yay
USER root
WORKDIR /
# makepkg user and workdir
ARG builduser=build
RUN useradd --system --create-home $builduser \
&& echo "$builduser ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$builduser
USER $builduser
WORKDIR /home/$builduser
RUN sudo pacman -S python-pip python-psutil inetutils --noconfirm
RUN yay -S daemonize --noconfirm
USER root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment