-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
36 lines (31 loc) · 1.15 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
FROM debian:bullseye-slim AS neovim
ARG NVIM_VERSION
ENV NVIM_VERSION=${NVIM_VERSION:-stable}
ENV BUILD_REQUIREMENTS "cmake curl gcc gettext git ninja-build unzip"
RUN apt-get update && \
apt-get install -y ${BUILD_REQUIREMENTS} && \
git clone --branch ${NVIM_VERSION} https://github.com/neovim/neovim && \
cd neovim && \
make install && \
rm -rf ../neovim && \
apt-get remove -y ${BUILD_REQUIREMENTS} && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
FROM rust:slim-bullseye AS tree-sitter-cli
RUN cargo install tree-sitter-cli
FROM debian:bullseye-slim
COPY --from=neovim /usr/local/share/nvim /usr/local/share/nvim
COPY --from=neovim /usr/local/lib/nvim /usr/local/lib/nvim
COPY --from=neovim /usr/local/bin/nvim /usr/local/bin/nvim
COPY --from=tree-sitter-cli /usr/local/cargo/bin/tree-sitter /usr/local/bin/tree-sitter
RUN apt-get update && \
apt-get install -y curl g++ git && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
useradd -ms /bin/bash yaml
USER yaml
WORKDIR /home/yaml/
RUN mkdir -p .config/nvim/
ADD tests/init.lua .config/nvim/init.lua
ADD . .
CMD ["nvim", "tests/sample.yaml"]