Create a new docker image from ghcr.io/vim-denops/vim or ghcr.io/vim-denops/neovim and clone Vim plugins in working directory like
FROM ghcr.io/vim-denops/vim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
ripgrep
ARG VERSION=main
RUN curl -sSL https://github.com/vim-denops/denops-helloworld.vim/archive/${VERSION}.tar.gz \
| tar xz \
&& deno cache --no-check=remote */denops/**/*.ts
Then build and run the image like
docker build -f Dockerfile -t vim .
docker run --rm -it vim
See examples/denops-helloworld.vim for details.
If you need to define .vimrc
, copy it to /root/.vimrc
(Vim) or /root/.config/nvim/init.vim
(Neovim).
For example, Shougo/ddc.vim requires .vimrc
like
" Load all plugins
packloadall
" Customize global settings
" Use around source.
" https://github.com/Shougo/ddc-around
call ddc#custom#patch_global('sources', ['around'])
" Use matcher_head and sorter_rank.
" https://github.com/Shougo/ddc-matcher_head
" https://github.com/Shougo/ddc-sorter_rank
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank']},
\ })
" Use ddc.
call ddc#enable()
Copy above .vimrc
with COPY
command like
FROM ghcr.io/vim-denops/vim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
git
RUN git clone https://github.com/Shougo/ddc.vim \
&& git clone https://github.com/Shougo/ddc-around \
&& git clone https://github.com/Shougo/ddc-matcher_head \
&& git clone https://github.com/Shougo/ddc-sorter_rank \
&& deno cache --no-check=remote */denops/**/*.ts
COPY vimrc /root/.vimrc
Then build and run the image like
docker build -f Dockerfile -t vim .
docker run --rm -it vim
See examples/ddc.vim for details.
Build ghcr.io/vim-denops/vim and ghcr.io/vim-denops/neovim with
make build
The push it with
make push
The code follows MIT license written in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.