-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (27 loc) · 1009 Bytes
/
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
34
FROM zjeffer/docker-arch-cuda:main
WORKDIR /app
RUN pacman -Syyu --noconfirm clang cmake make gcc gdb git sudo less
# add user
################# USER & GROUP CREATION #################
ARG USERNAME=user
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
################# SUDO #################
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
USER $USERNAME
ENV HOME /home/$USERNAME
# g3log
COPY ./vendor/g3log/ ./vendor/g3log/
RUN sudo chown -R $USERNAME:$USERNAME /app
RUN mkdir /app/vendor/g3log/build
RUN cd /app/vendor/g3log/build && cmake .. && sudo cmake --build . --target install
# json
RUN sudo pacman -Syy --noconfirm nlohmann-json
# zsh & oh-my-zsh
RUN sudo pacman -Syy --noconfirm zsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN sudo chsh -s /bin/zsh $USERNAME
COPY . .