forked from benmezger/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 986 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 986 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
FROM archlinux/archlinux:latest
LABEL maintainer="Willian de Souza <hello@williandesouza.com>"
# Update system and install base packages
RUN pacman -Syu --noconfirm
RUN pacman -S sudo git file awk gcc base-devel reflector make curl wget tar gzip \
which systemd systemd-sysvcompat go python python-pip --noconfirm
# Setup mirrors
RUN reflector --latest 5 \
--save "/etc/pacman.d/mirrorlist" \
--sort rate \
--protocol https \
--verbose
# Create user and setup sudo
RUN useradd -ms /bin/bash archie
RUN usermod -aG wheel archie
RUN echo 'archie ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Create necessary directories
RUN mkdir -p /home/archie/.local/share/chezmoi
RUN mkdir -p /home/archie/.config/notes
RUN mkdir -p /home/archie/.gnupg
RUN mkdir -p /home/archie/.ssh
USER archie
WORKDIR /home/archie/dotfiles
# Copy dotfiles with correct ownership
COPY --chown=archie:archie . /home/archie/dotfiles
ENTRYPOINT ["bash", "docker-entrypoint.sh"]