-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (47 loc) · 1.12 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
FROM alpine:3.14 as tools
# install dependencies
RUN apk add --no-cache \
git \
build-base \
cmake \
automake \
autoconf \
libtool \
pkgconf \
coreutils \
curl \
unzip \
gettext-tiny-dev \
musl-dev
WORKDIR /tools
RUN \
# build neovim
cd /tools \
&& git clone https://github.com/neovim/neovim.git \
&& cd neovim \
&& make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=/tools/nvim install \
# fetch plugin manager
&& cd /tools \
&& curl -fLo /tools/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
FROM alpine:3.14
# install dependencies
RUN apk add --no-cache \
musl-dev \
g++ \
curl \
git \
nodejs
# add neovim
COPY --from=tools /tools/nvim /nvim
RUN ln -s /nvim/bin/nvim /usr/bin/nvim
# add user
RUN adduser -D neovim
USER neovim
# add config
COPY --chown=neovim:neovim config /home/neovim/.config
# add plugin manager
COPY --chown=neovim:neovim --from=tools /tools/plug.vim /home/neovim/.config/nvim/autoload/
# install plugins
RUN nvim --headless +PlugInstall +qall
WORKDIR /data
ENTRYPOINT [ "nvim", "."]