-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
52 lines (47 loc) · 1.36 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
FROM registry.fedoraproject.org/fedora-minimal:32
RUN microdnf install -y \
fd-find \
gcc \
git \
make \
neovim \
nodejs \
ripgrep \
ShellCheck \
&& microdnf clean all \
;
ENV RUSTUP_HOME=/root/rustup \
CARGO_HOME=/root/cargo \
PATH=/root/cargo/bin:$PATH \
RUST_SRC_PATH=/root/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src \
USER=root
RUN curl -f -L https://static.rust-lang.org/rustup.sh -O \
&& sh rustup.sh -y \
--no-modify-path \
--profile minimal \
&& rustup default stable \
&& rustup component add rls rust-analysis rust-src \
&& rm rustup.sh \
;
COPY init.vim /root/.config/nvim/
RUN mkdir -p /root/.config/coc/extensions \
&& cd /root/.config/coc/extensions \
&& echo '{"dependencies":{}}'> package.json \
&& npm install \
coc-diagnostic \
coc-markdownlint \
coc-prettier \
coc-rls \
coc-spell-checker \
--only=prod \
&& curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim \
&& nvim --headless +PlugInstall +qall \
&& printf '{\n\
"coc.preferences.formatOnSaveFiletypes": ["*"],\n\
"diagnostic.messageTarget": "echo",\n\
"diagnostic-languageserver.filetypes": {\n\
"sh": "shellcheck"\n\
}\n\
}' > /root/.config/nvim/coc-settings.json \
&& echo "alias vi='nvim'" >> /root/.bashrc \
;