This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
112 lines (89 loc) · 3.54 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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM archlinux:latest
#--------------------------------------------------------------------#
#- installing packman dependencies -#
#--------------------------------------------------------------------#
RUN pacman -Syu --noconfirm
RUN pacman -S --needed --noconfirm \
git \
fd \
wget \
xclip \
ripgrep \
base-devel \
unzip \
cmake \
jdk-openjdk \
python-pip \
npm \
yarn \
rust \
zsh
RUN yarn global add prettierd
RUN pip install --upgrade autopep8
RUN cargo install stylua
RUN cargo install taplo-cli
RUN cargo install silicon
#--------------------------------------------------------------------#
#- env variables -#
#--------------------------------------------------------------------#
ENV SHELL="/bin/bash"
ENV PATH="~/.local/bin:${PATH}"
ENV PATH="~/.cargo/bin:${PATH}"
ENV PATH="~/.yarn/bin:${PATH}"
#--------------------------------------------------------------------#
#- setting up dotfiles -#
#--------------------------------------------------------------------#
WORKDIR /root
RUN git init .
RUN git remote add -f origin https://github.com/s1n7ax/dothome-new.git
RUN git switch main
#--------------------------------------------------------------------#
#- installing oh my zsh -#
#--------------------------------------------------------------------#
RUN CHSH=yes;RUNZSH=no;KEEP_ZSHRC=yes; sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#--------------------------------------------------------------------#
#- installing neovim -#
#--------------------------------------------------------------------#
WORKDIR /
RUN git clone https://github.com/neovim/neovim.git
WORKDIR /neovim
RUN make CMAKE_BUILD_TYPE=Release
RUN make install
RUN ln -s /usr/local/bin/nvim /usr/sbin/nvim
RUN rm -rf /neovim
#--------------------------------------------------------------------#
#- setting neovim config -#
#--------------------------------------------------------------------#
RUN git clone --recurse-submodules -j8 https://github.com/s1n7ax/dotnvim.git ~/.config/nvim
WORKDIR /
RUN mkdir -p ~/.local/share/nvim/lsp_server_additions/jdtls
RUN git clone https://github.com/microsoft/java-debug.git
RUN git clone https://github.com/microsoft/vscode-java-test.git
WORKDIR /java-debug
RUN chmod u+x mvnw
RUN ./mvnw clean install -Dmaven.artifact.threads=10
RUN cp \
com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar \
~/.local/share/nvim/lsp_server_additions/jdtls
WORKDIR /vscode-java-test
RUN yarn
RUN yarn build-plugin
RUN cp server/*.jar ~/.local/share/nvim/lsp_server_additions/jdtls
# Issue: when max_jobs is set the instance will not exist so following will
# remove the setting if exists and run PackerSync
# https://github.com/wbthomason/packer.nvim/issues/751
RUN sed -i "s/max_jobs *= *[0-9]\+,*//" ~/.config/nvim/lua/nvim/plugins/packer/install.lua
#--------------------------------------------------------------------#
#- installing neovim plugins -#
#--------------------------------------------------------------------#
RUN nvim \
--headless \
-c 'autocmd User PackerComplete quitall' \
-c 'silent PackerSync'
RUN nvim \
--headless \
-c 'set cmdheight=50' \
-c 'silent TSInstallSync all' \
-c 'sleep 20' \
-c 'qall'
WORKDIR /root