-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.arch
52 lines (38 loc) · 1.25 KB
/
Dockerfile.arch
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM archlinux:latest
ENV HOSTNAME linux-docker
ENV USER cmiranda
ENV PASSWORD cmiranda
ENV SHELL=/bin/zsh
ENV TERM=xterm-256color
RUN echo "[multilib]" >> /etc/pacman.conf && \
echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf && \
sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$(nproc)\"/" /etc/makepkg.conf
RUN pacman --noconfirm -Syu \
base-devel \
curl \
git \
openssh \
sudo \
zsh
RUN chsh -s /bin/zsh root
RUN groupadd --gid 500 $USER && \
useradd --create-home --system --shell /usr/sbin/zsh --uid 500 --gid 500 $USER
RUN echo $USER:$PASSWORD | chpasswd
RUN chsh -s /bin/zsh $USER && \
echo $USER 'ALL=(ALL) ALL' >> /etc/sudoers && \
chown -R $USER:$USER /home/$USER
USER $USER
WORKDIR /home/$USER
# RUN mkdir /home/$USER/dotfiles
# WORKDIR /home/$USER/dotfiles
# COPY . .
# RUN sudo chown -R $USER:$USER /home/$USER/dotfiles
# RUN bash scripts/dependencies.sh
# RUN bash scripts/tests/mock-secrets.sh .
# BACKUP_DIR=/data/ssd/backups/manual/secrets
# scp -r -P 62022 [email protected]:${BACKUP_DIR}/.gnupg .
# scp -r -P 62022 [email protected]:${BACKUP_DIR}/.ssh .
# scp -r -P 62022 [email protected]:${BACKUP_DIR}/.cert .
# bash scripts/secrets.sh
# bash scripts/sync.sh
CMD ["/usr/bin/zsh"]