-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjc_dev.docker
62 lines (52 loc) · 1.97 KB
/
jc_dev.docker
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
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:20.04
ARG TZ=America/Chicago
ENV TIMEZONE=$TZ
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone
RUN apt-get update
RUN apt-get update && apt-get install --no-install-recommends -y \
python3 \
python3-pip \
python3-dev
RUN apt-get install -y clangd-11
#neovim dependencies
RUN pip3 install neovim
RUN apt-get install -y git ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
#build neovim
RUN mkdir /opt/tools/
RUN cd /opt/tools/ \
&& git clone https://github.com/neovim/neovim
RUN cd /opt/tools/neovim \
&& make CMAKE_BUILD_TYPE=RelWithDebInfo \
&& make install
#oh-my-zsh
RUN apt-get install -y zsh
#add users
ARG USERNAME=dockerdev
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y sudo wget \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
USER $USERNAME
RUN cd /tmp/ && wget https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh && chmod +x zsh-in-docker.sh
RUN /tmp/zsh-in-docker.sh \
-t https://github.com/denysdovhan/spaceship-prompt \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-p git \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-history-substring-search \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-p 'history-substring-search'
#RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)"
ENTRYPOINT [ "/bin/zsh" ]
CMD ["-l"]