Created
July 21, 2024 09:29
-
-
Save NoelJacob/fd29d41531c392b3ea6215f7083860a7 to your computer and use it in GitHub Desktop.
Arch Linux Docker
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
# Use the latest Arch Linux image | |
FROM archlinux:latest | |
# Initialize the pacman keyring | |
RUN pacman-key --init | |
# Update the system packages and install sudo | |
RUN pacman -Syu --noconfirm && \ | |
pacman -S --noconfirm sudo | |
# Create a new user named 'noel' without a password | |
RUN useradd -m noel && \ | |
passwd -d noel && \ | |
echo "noel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/noel | |
# Switch to the new user | |
USER noel | |
# Set the working directory | |
WORKDIR /home/noel | |
# Bind mount the 'Dev' directory | |
VOLUME /home/noel/Dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment