-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile.arch
More file actions
34 lines (26 loc) · 803 Bytes
/
Dockerfile.arch
File metadata and controls
34 lines (26 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Dockerfile for testing Arch Linux dotfiles installation
FROM archlinux:latest
# Set TERM to prevent tput errors
ENV TERM=xterm-256color
# Update system and install base packages
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm \
sudo \
git \
curl \
wget \
base-devel \
&& pacman -Scc --noconfirm
# Create a test user (don't run as root)
RUN useradd -m -s /bin/bash testuser && \
echo "testuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Switch to test user
USER testuser
WORKDIR /home/testuser
# Copy dotfiles to container
COPY --chown=testuser:testuser . /home/testuser/dotfiles
# Set DOTFILES environment variable
ENV DOTFILES=/home/testuser/dotfiles
WORKDIR /home/testuser/dotfiles
# Default command - run bash for interactive testing
CMD ["/bin/bash"]