archlinux/Dockerfile

29 lines
765 B
Text
Raw Normal View History

2024-10-02 20:07:59 +01:00
# Use Arch Linux as the base image
FROM archlinux:base-devel
# Set environment variables for non-interactive mode
ENV DEBIAN_FRONTEND=noninteractive
# Update the package manager and install necessary packages
RUN pacman -Syu --noconfirm git
# Create a new user named 'user' with UID 1000
RUN useradd -m -u 1000 user && \
echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Switch to the new user
USER user
# Install yay-bin AUR package
RUN git clone https://aur.archlinux.org/yay-bin.git /home/user/yay-bin && \
cd /home/user/yay-bin && \
makepkg -si --noconfirm && \
cd ~ && \
rm -rf /home/user/yay-bin
# Install neofetch with yay
RUN yay -S --noconfirm neofetch
# Set the default command
CMD ["neofetch"]