Yolks/base/arch/Dockerfile

45 lines
No EOL
1 KiB
Docker

FROM archlinux:latest
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
LABEL upstream="https://github.com/pelican-eggs/yolks"
RUN pacman -Sy
RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm base-devel git gcc cmake nasm curl tar zip unzip sqlite3 bzip2 cabextract gnu-netcat
RUN useradd -m -d /home/container -s /bin/bash container
RUN useradd -m -G wheel bld && passwd -d bld
ENV USER=bld HOME=/home/bld
STOPSIGNAL SIGINT
# Install Yay from the builder
RUN mkdir -pv /tmp
WORKDIR /tmp
# Create necessary entry to sudoers
RUN echo "bld ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER bld
RUN git clone https://aur.archlinux.org/yay.git /tmp/yay
WORKDIR /tmp/yay
RUN makepkg -si --noconfirm
WORKDIR /
RUN yay -S --noconfirm tini-git
USER root
RUN rm -rf /tmp/yay
USER container
ENV USER=container HOME=/home/container
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]