-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1.01 KB
/
Dockerfile
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
FROM archlinux:latest
ENV TINI_VERSION v0.19.0
ARG user
ARG pwd
RUN test -n "${user}"
RUN test -n "${pwd}"
RUN pacman -Syy
RUN pacman -S --noconfirm base-devel meson ninja clang llvm mold
RUN pacman -S --noconfirm yaml-cpp
RUN pacman -S --noconfirm git openssh
RUN ssh-keygen -A
RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
RUN mkdir -p /usr/local/bin
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
RUN chmod +x /usr/local/bin/tini
RUN groupadd ${user}
RUN useradd --uid 1000 --gid ${user} --groups wheel,users --create-home --shell /bin/bash ${user}
RUN echo "${user}:pass" | chpasswd
RUN echo "cd ${pwd}" >> "/home/${user}/.bash_profile"
RUN echo "export CC=clang" >> "/home/${user}/.bash_profile"
RUN echo "export CXX=clang++" >> "/home/${user}/.bash_profile"
RUN echo "export CC_LD=mold" >> "/home/${user}/.bash_profile"
RUN echo "export CXX_LD=mold" >> "/home/${user}/.bash_profile"
EXPOSE 22
ENTRYPOINT ["/usr/local/bin/tini", "--"]
CMD ["/usr/sbin/sshd", "-D"]