-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
36 lines (26 loc) · 1.03 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
34
35
36
FROM archlinux
# Install git and any other dependencies you may need
RUN pacman -Suy --noconfirm
RUN pacman -S --noconfirm sudo git
RUN pacman -S --noconfirm vim tmux
RUN pacman -S --noconfirm npm yarn
RUN pacman -S --noconfirm gcc python-pipenv
# RUN pip3 install ecdsa fastecdsa sympy cairo-lang
ARG USERNAME=ccolorado
ARG USER_UID=1000
ARG USER_HOME=/home/${USERNAME}
ARG USER_GROUP=wheel
# Create new user with specified UID and home directory
RUN useradd --uid ${USER_UID} --home ${USER_HOME} --create-home ${USERNAME}
# Add user to specified groups
RUN usermod -aG ${USERNAME} ${USERNAME}
RUN usermod -aG ${USER_GROUP} ${USERNAME}
# Set ownership and permissions for user's home directory
RUN chown -R ${USERNAME}:${USERNAME} ${USER_HOME}
RUN chmod 700 ${USER_HOME}
RUN echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME}
USER ${USERNAME}
WORKDIR ${USER_HOME}
RUN rm ${USER_HOME}/.bashrc
RUN rm ${USER_HOME}/.bash_profile
RUN git clone https://github.com/ccolorado/configfiles.git "${USER_HOME}/_git.configfiles"