Skip to content

Instantly share code, notes, and snippets.

@NoelJacob
Created July 21, 2024 09:29
Show Gist options
  • Save NoelJacob/fd29d41531c392b3ea6215f7083860a7 to your computer and use it in GitHub Desktop.
Save NoelJacob/fd29d41531c392b3ea6215f7083860a7 to your computer and use it in GitHub Desktop.
Arch Linux Docker
# 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