-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathDockerfile
50 lines (38 loc) · 945 Bytes
/
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
FROM alpine:latest AS base
RUN apk --no-cache add \
autoconf \
automake \
build-base \
cmake \
ninja \
coreutils \
curl \
gettext-tiny-dev \
git \
libtool \
pkgconf \
unzip \
stow \
npm
# Build neovim (and use it as an example codebase
RUN git clone https://github.com/neovim/neovim.git
ARG VERSION=master
RUN cd neovim && git checkout ${VERSION} && make CMAKE_BUILD_TYPE=RelWithDebInfo install
# To support kickstart.nvim
RUN apk --no-cache add \
fd \
ctags \
ripgrep \
git
ENV work_dir="/workspace"
ENV modern_neovim="$work_dir/modern-neovim"
WORKDIR $work_dir
COPY . ./
RUN mkdir -p "$modern_neovim/nvim"
RUN cd $work_dir && stow --restow --target="$modern_neovim/nvim" .
RUN mkdir -p "$modern_neovim/share"
ENV XDG_DATA_HOME="$modern_neovim/share"
ENV XDG_CACHE_HOME="$modern_neovim"
ENV XDG_CONFIG_HOME="$modern_neovim"
EXPOSE 6666
CMD [ "nvim", "--headless", "--listen", "0.0.0.0:6666" ]