-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.archlinux
34 lines (28 loc) · 1.02 KB
/
Dockerfile.archlinux
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:latest
LABEL org.opencontainers.image.authors="Subho Sankar Banerjee <[email protected]>"
LABEL org.opencontainers.image.title="Dotfiles"
LABEL org.opencontainers.image.source="https://github.com/ssbanerje/dotfiles"
ARG user=dotuser
ARG uid=1000
# Setup prereq packages
USER root
RUN pacman-key --init && pacman -Sy --noconfirm && \
pacman -S --noconfirm sudo python openssh && \
useradd -r -md /home/${user} -s /bin/bash --uid ${uid} ${user} && \
groupadd docker && \
usermod -aG docker ${user} && \
echo "%${user} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
pacman -Scc --noconfirm && \
rm -rf /tmp/*
# Setup dotfiles
USER ${user}
COPY --chown=${user}:${user} . /home/${user}/.dotfiles
RUN cd /home/${user}/.dotfiles && \
./install_profile -vv -x archlinux-minimal && \
git remote set-url origin [email protected]:ssbanerje/dotfiles && \
sudo pacman -Scc --noconfirm && \
sudo rm -rf /tmp/*
# Take command from user
ENTRYPOINT ["/bin/bash", "-l", "-c"]
CMD []
# vim:ft=dockerfile: