├── .gitattributes ├── examples ├── ddc.vim │ ├── README.md │ ├── Dockerfile.vim │ ├── Dockerfile.neovim │ └── vimrc └── denops-helloworld.vim │ ├── README.md │ ├── Dockerfile.vim │ └── Dockerfile.neovim ├── .gitmessage ├── compose.yaml ├── LICENSE ├── .github └── workflows │ └── build.yml ├── README.md └── dockerfiles ├── vim └── neovim /.gitattributes: -------------------------------------------------------------------------------- 1 | # gitattributes file 2 | # https://github.com/github/linguist/blob/master/docs/overrides.md 3 | 4 | * -text 5 | 6 | *.vim linguist-language=Dockerfile 7 | *.neovim linguist-language=Dockerfile 8 | -------------------------------------------------------------------------------- /examples/ddc.vim/README.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | ## Vim 4 | 5 | ``` 6 | docker build -f Dockerfile.vim -t vim . 7 | docker run --rm -it vim 8 | ``` 9 | 10 | ## Neovim 11 | 12 | ``` 13 | docker build -f Dockerfile.neovim -t neovim . 14 | docker run --rm -it neovim 15 | ``` 16 | -------------------------------------------------------------------------------- /examples/denops-helloworld.vim/README.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | ## Vim 4 | 5 | ``` 6 | docker build -f Dockerfile.vim -t vim . 7 | docker run --rm -it vim 8 | ``` 9 | 10 | ## Neovim 11 | 12 | ``` 13 | docker build -f Dockerfile.neovim -t neovim . 14 | docker run --rm -it neovim 15 | ``` 16 | -------------------------------------------------------------------------------- /examples/denops-helloworld.vim/Dockerfile.vim: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/vim-denops/vim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | curl \ 6 | ca-certificates \ 7 | ripgrep 8 | 9 | ARG VERSION=main 10 | RUN curl -sSL https://github.com/vim-denops/denops-helloworld.vim/archive/${VERSION}.tar.gz \ 11 | | tar xz \ 12 | && deno cache --unstable --no-check=remote */denops/**/*.ts 13 | -------------------------------------------------------------------------------- /examples/denops-helloworld.vim/Dockerfile.neovim: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/vim-denops/neovim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | curl \ 6 | ca-certificates \ 7 | ripgrep 8 | 9 | ARG VERSION=main 10 | RUN curl -sSL https://github.com/vim-denops/denops-helloworld.vim/archive/${VERSION}.tar.gz \ 11 | | tar xz \ 12 | && deno cache --unstable --no-check=remote */denops/**/*.ts 13 | -------------------------------------------------------------------------------- /examples/ddc.vim/Dockerfile.vim: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/vim-denops/vim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | git 7 | 8 | RUN git clone https://github.com/Shougo/ddc.vim \ 9 | && git clone https://github.com/Shougo/ddc-around \ 10 | && git clone https://github.com/Shougo/ddc-matcher_head \ 11 | && git clone https://github.com/Shougo/ddc-sorter_rank \ 12 | && deno cache --unstable --no-check=remote */denops/**/*.ts 13 | 14 | COPY vimrc /root/.vimrc 15 | -------------------------------------------------------------------------------- /examples/ddc.vim/Dockerfile.neovim: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/vim-denops/neovim 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y --no-install-recommends \ 5 | ca-certificates \ 6 | git 7 | 8 | RUN git clone https://github.com/Shougo/ddc.vim \ 9 | && git clone https://github.com/Shougo/ddc-around \ 10 | && git clone https://github.com/Shougo/ddc-matcher_head \ 11 | && git clone https://github.com/Shougo/ddc-sorter_rank \ 12 | && deno cache --unstable --no-check=remote */denops/**/*.ts 13 | 14 | COPY vimrc /root/.config/nvim/init.vim 15 | -------------------------------------------------------------------------------- /examples/ddc.vim/vimrc: -------------------------------------------------------------------------------- 1 | " Load all plugins 2 | packloadall 3 | 4 | " Customize global settings 5 | " Use around source. 6 | " https://github.com/Shougo/ddc-around 7 | call ddc#custom#patch_global('sources', ['around']) 8 | 9 | " Use matcher_head and sorter_rank. 10 | " https://github.com/Shougo/ddc-matcher_head 11 | " https://github.com/Shougo/ddc-sorter_rank 12 | call ddc#custom#patch_global('sourceOptions', { 13 | \ '_': { 14 | \ 'matchers': ['matcher_head'], 15 | \ 'sorters': ['sorter_rank']}, 16 | \ }) 17 | 18 | " Use ddc. 19 | call ddc#enable() 20 | -------------------------------------------------------------------------------- /.gitmessage: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Guide (v1.0) 4 | # 5 | # 👍 :+1: Apply changes. 6 | # 7 | # 🌿 :herb: Add or update things for tests. 8 | # ☕ :coffee: Add or update things for developments. 9 | # 📦 :package: Add or update dependencies. 10 | # 📝 :memo: Add or update documentations. 11 | # 12 | # 🐛 :bug: Bugfixes. 13 | # 💋 :kiss: Critical hotfixes. 14 | # 🚿 :shower: Remove features, codes, or files. 15 | # 16 | # 🚀 :rocket: Improve performance. 17 | # 💪 :muscle: Refactor codes. 18 | # 💥 :boom: Breaking changes. 19 | # 💩 :poop: Bad codes needs to be improved. 20 | # 21 | # How to use: 22 | # git config commit.template .gitmessage 23 | # 24 | # Reference: 25 | # https://github.com/lambdalisue/emojiprefix 26 | -------------------------------------------------------------------------------- /compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | vim: 3 | image: ghcr.io/vim-denops/vim:${DOCKER_TAG:-latest} 4 | build: 5 | context: . 6 | dockerfile: dockerfiles/vim 7 | platforms: 8 | - linux/amd64 9 | - linux/arm64 10 | args: 11 | DENOPS_VERSION: ${DENOPS_VERSION:-main} 12 | cache_from: 13 | - ghcr.io/vim-denops/vim/cache 14 | - ghcr.io/vim-denops/vim 15 | cache_to: 16 | - type=registry,ref=ghcr.io/vim-denops/vim/cache,mode=max 17 | 18 | neovim: 19 | image: ghcr.io/vim-denops/neovim:${DOCKER_TAG:-latest} 20 | build: 21 | context: . 22 | dockerfile: dockerfiles/neovim 23 | platforms: 24 | - linux/amd64 25 | - linux/arm64 26 | args: 27 | DENOPS_VERSION: ${DENOPS_VERSION:-main} 28 | cache_from: 29 | - ghcr.io/vim-denops/neovim/cache 30 | - ghcr.io/vim-denops/neovim 31 | cache_to: 32 | - type=registry,ref=ghcr.io/vim-denops/neovim/cache,mode=max 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 vim-denops 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | workflow_dispatch: 8 | inputs: 9 | denops_version: 10 | description: Denops version 11 | required: false 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - uses: docker/setup-qemu-action@v3 19 | - uses: docker/setup-buildx-action@v3 20 | - uses: docker/login-action@v3 21 | with: 22 | registry: ghcr.io 23 | username: ${{ github.actor }} 24 | password: ${{ secrets.GITHUB_TOKEN }} 25 | 26 | - name: Construct variables 27 | id: vars 28 | run: | 29 | if [[ -z "${{ github.event.inputs.denops_version }}" ]]; then 30 | DENOPS_VERSION=main 31 | else 32 | DENOPS_VERSION=${{ github.event.inputs.denops_version }} 33 | fi 34 | if [[ $DENOPS_VERSION == v* ]]; then 35 | echo "DOCKER_TAG=$DENOPS_VERSION" >> $GITHUB_OUTPUT 36 | # vX.Y.Z -> vX.Y (major and minor) 37 | echo "DOCKER_TAG_MINOR=$(echo $DENOPS_VERSION | sed -r 's/(v[0-9]+)(\.[0-9]+)(\.[0-9]+)/\1\2/')" >> $GITHUB_OUTPUT 38 | # vX.Y.Z -> vX (major only) 39 | echo "DOCKER_TAG_MAJOR=$(echo $DENOPS_VERSION | sed -r 's/(v[0-9]+)(\.[0-9]+)(\.[0-9]+)/\1/')" >> $GITHUB_OUTPUT 40 | else 41 | echo "DOCKER_TAG=latest" >> $GITHUB_OUTPUT 42 | echo "DOCKER_TAG_MINOR=latest" >> $GITHUB_OUTPUT 43 | echo "DOCKER_TAG_MAJOR=latest" >> $GITHUB_OUTPUT 44 | fi 45 | shell: bash 46 | 47 | - name: Build and push Docker image (Vim) 48 | uses: docker/build-push-action@v6 49 | with: 50 | file: ./dockerfiles/vim 51 | tags: | 52 | ghcr.io/vim-denops/vim:latest 53 | ghcr.io/vim-denops/vim:${{ steps.vars.outputs.DOCKER_TAG }} 54 | ghcr.io/vim-denops/vim:${{ steps.vars.outputs.DOCKER_TAG_MINOR }} 55 | ghcr.io/vim-denops/vim:${{ steps.vars.outputs.DOCKER_TAG_MAJOR }} 56 | cache-from: | 57 | ghcr.io/vim-denops/vim/cache 58 | ghcr.io/vim-denops/vim 59 | cache-to: | 60 | type=registry,ref=ghcr.io/vim-denops/vim/cache,mode=max 61 | context: . 62 | platforms: | 63 | linux/amd64 64 | linux/arm64 65 | push: true 66 | 67 | - name: Build and push Docker image (Neovim) 68 | uses: docker/build-push-action@v6 69 | with: 70 | file: ./dockerfiles/neovim 71 | tags: | 72 | ghcr.io/vim-denops/neovim:latest 73 | ghcr.io/vim-denops/neovim:${{ steps.vars.outputs.DOCKER_TAG }} 74 | ghcr.io/vim-denops/neovim:${{ steps.vars.outputs.DOCKER_TAG_MINOR }} 75 | ghcr.io/vim-denops/neovim:${{ steps.vars.outputs.DOCKER_TAG_MAJOR }} 76 | cache-from: | 77 | ghcr.io/vim-denops/neovim/cache 78 | ghcr.io/vim-denops/neovim 79 | cache-to: | 80 | type=registry,ref=ghcr.io/vim-denops/neovim/cache,mode=max 81 | context: . 82 | platforms: | 83 | linux/amd64 84 | linux/arm64 85 | push: true 86 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # denops-dockerfile 2 | 3 | [![Build](https://github.com/vim-denops/denops-dockerfile/actions/workflows/build.yml/badge.svg)](https://github.com/vim-denops/denops-dockerfile/actions/workflows/build.yml) 4 | 5 | ## Usage 6 | 7 | ### Minimum 8 | 9 | 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 10 | 11 | ```Dockerfile 12 | FROM ghcr.io/vim-denops/vim 13 | 14 | RUN apt-get update \ 15 | && apt-get install -y --no-install-recommends \ 16 | curl \ 17 | ca-certificates \ 18 | ripgrep 19 | 20 | ARG VERSION=main 21 | RUN curl -sSL https://github.com/vim-denops/denops-helloworld.vim/archive/${VERSION}.tar.gz \ 22 | | tar xz \ 23 | && deno cache --no-check=remote */denops/**/*.ts 24 | ``` 25 | 26 | Then build and run the image like 27 | 28 | ``` 29 | docker build -f Dockerfile -t vim . 30 | docker run --rm -it vim 31 | ``` 32 | 33 | See [examples/denops-helloworld.vim](./examples/denops-helloworld.vim) for details. 34 | 35 | ### Advanced 36 | 37 | If you need to define `.vimrc`, copy it to `/root/.vimrc` (Vim) or `/root/.config/nvim/init.vim` (Neovim). 38 | 39 | For example, [Shougo/ddc.vim](https://github.com/Shougo/ddc.vim) requires `.vimrc` like 40 | 41 | ```vim 42 | " Load all plugins 43 | packloadall 44 | 45 | " Customize global settings 46 | " Use around source. 47 | " https://github.com/Shougo/ddc-around 48 | call ddc#custom#patch_global('sources', ['around']) 49 | 50 | " Use matcher_head and sorter_rank. 51 | " https://github.com/Shougo/ddc-matcher_head 52 | " https://github.com/Shougo/ddc-sorter_rank 53 | call ddc#custom#patch_global('sourceOptions', { 54 | \ '_': { 55 | \ 'matchers': ['matcher_head'], 56 | \ 'sorters': ['sorter_rank']}, 57 | \ }) 58 | 59 | " Use ddc. 60 | call ddc#enable() 61 | ``` 62 | 63 | Copy above `.vimrc` with `COPY` command like 64 | 65 | ```Dockerfile 66 | FROM ghcr.io/vim-denops/vim 67 | 68 | RUN apt-get update \ 69 | && apt-get install -y --no-install-recommends \ 70 | ca-certificates \ 71 | git 72 | 73 | RUN git clone https://github.com/Shougo/ddc.vim \ 74 | && git clone https://github.com/Shougo/ddc-around \ 75 | && git clone https://github.com/Shougo/ddc-matcher_head \ 76 | && git clone https://github.com/Shougo/ddc-sorter_rank \ 77 | && deno cache --no-check=remote */denops/**/*.ts 78 | 79 | COPY vimrc /root/.vimrc 80 | ``` 81 | 82 | Then build and run the image like 83 | 84 | ``` 85 | docker build -f Dockerfile -t vim . 86 | docker run --rm -it vim 87 | ``` 88 | 89 | See [examples/ddc.vim](./examples/ddc.vim) for details. 90 | 91 | [ghcr.io/vim-denops/vim]: https://github.com/vim-denops/denops-dockerfile/pkgs/container/vim 92 | [ghcr.io/vim-denops/neovim]: https://github.com/vim-denops/denops-dockerfile/pkgs/container/neovim 93 | 94 | ## Development 95 | 96 | Build [ghcr.io/vim-denops/vim][] and [ghcr.io/vim-denops/neovim][] with 97 | 98 | ``` 99 | docker compose build 100 | ``` 101 | 102 | Then push it with 103 | 104 | ``` 105 | docker compose push 106 | ``` 107 | 108 | You can also specify the Denops version and Docker tag: 109 | 110 | ``` 111 | DENOPS_VERSION=v6.0.0 DOCKER_TAG=v6.0.0 docker compose build 112 | DOCKER_TAG=v6.0.0 docker compose push 113 | ``` 114 | 115 | ## License 116 | 117 | The code follows MIT license written in [LICENSE](./LICENSE). Contributors need 118 | to agree that any modifications sent in this repository follow the license. 119 | -------------------------------------------------------------------------------- /dockerfiles/vim: -------------------------------------------------------------------------------- 1 | # syntax=docker.io/docker/dockerfile:1.4 2 | #------------------------------------------------------------------------------------------------------------ 3 | FROM debian:bookworm-backports as vim 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | 6 | # Install requirements 7 | RUN --mount=type=cache,target=/var/cache/apt,sharing=private \ 8 | --mount=type=cache,target=/var/lib/apt,sharing=private \ 9 | apt-get update \ 10 | && apt-get install -y --no-install-recommends \ 11 | curl \ 12 | ca-certificates \ 13 | build-essential \ 14 | gettext \ 15 | libtinfo-dev 16 | 17 | ARG VIM_VERSION=v9.1.1646 18 | RUN mkdir -p /working \ 19 | && curl -sSL https://github.com/vim/vim/archive/${VIM_VERSION}.tar.gz \ 20 | | tar xz -C /working --strip-components=1 21 | 22 | WORKDIR /working 23 | RUN ./configure --prefix=/opt/vim --with-features=huge --enable-fail-if-missing 24 | RUN make -j$(nproc) 25 | RUN make install 26 | 27 | 28 | #------------------------------------------------------------------------------------------------------------ 29 | FROM debian:bookworm-backports as deno 30 | ENV DEBIAN_FRONTEND=noninteractive 31 | 32 | # Install requirements 33 | RUN --mount=type=cache,target=/var/cache/apt,sharing=private \ 34 | --mount=type=cache,target=/var/lib/apt,sharing=private \ 35 | apt-get update \ 36 | && apt-get install -y --no-install-recommends \ 37 | curl \ 38 | ca-certificates \ 39 | unzip \ 40 | git 41 | 42 | ARG DENO_VERSION=v2.3.0 43 | RUN curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/opt/deno sh -s ${DENO_VERSION} 44 | 45 | 46 | #------------------------------------------------------------------------------------------------------------ 47 | FROM debian:bookworm-backports as denops 48 | ENV DEBIAN_FRONTEND=noninteractive 49 | 50 | # Install requirements 51 | RUN --mount=type=cache,target=/var/cache/apt,sharing=private \ 52 | --mount=type=cache,target=/var/lib/apt,sharing=private \ 53 | apt-get update \ 54 | && apt-get install -y --no-install-recommends \ 55 | ca-certificates \ 56 | git 57 | 58 | # Install denops.vim 59 | ARG DENOPS_VERSION=main 60 | RUN mkdir -p denops.vim \ 61 | && cd denops.vim \ 62 | && git init \ 63 | && git remote add origin https://github.com/vim-denops/denops.vim.git \ 64 | && git fetch origin ${DENOPS_VERSION} \ 65 | && git reset --hard FETCH_HEAD 66 | 67 | 68 | #------------------------------------------------------------------------------------------------------------ 69 | FROM debian:bookworm-slim as runtime 70 | ENV DEBIAN_FRONTEND=noninteractive 71 | 72 | LABEL org.opencontainers.image.url https://github.com/orgs/vim-denops/packages/container/package/vim 73 | LABEL org.opencontainers.image.source https://github.com/vim-denops/denops-dockerfile 74 | 75 | # Prefer to use Debian Backports 76 | # https://backports.debian.org/ 77 | RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/backports.list 78 | 79 | # Runtime environment 80 | ENV LC_ALL=C.UTF-8 \ 81 | PATH=/opt/vim/usr/local/bin:/opt/deno/bin:${PATH} 82 | 83 | COPY --from=vim /opt/vim /opt/vim 84 | COPY --from=deno /opt/deno /opt/deno 85 | COPY --from=denops /denops.vim /root/.vim/pack/denops/start/denops.vim 86 | 87 | # Install denops.vim 88 | WORKDIR /root/.vim/pack/denops/start/denops.vim 89 | RUN deno cache denops/**/*.ts 90 | 91 | # Create helptags 92 | RUN /opt/vim/bin/vim -i NONE -n -N -X -e -s -V1 -c "helptags ALL" -c q 93 | 94 | # Setup user custom pack environment 95 | RUN mkdir -p /root/.vim/pack/user/start 96 | WORKDIR /root/.vim/pack/user/start 97 | 98 | ENTRYPOINT ["/opt/vim/bin/vim"] 99 | -------------------------------------------------------------------------------- /dockerfiles/neovim: -------------------------------------------------------------------------------- 1 | # syntax=docker.io/docker/dockerfile:1.4 2 | #------------------------------------------------------------------------------------------------------------ 3 | FROM debian:bookworm-backports as neovim 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | 6 | # Install requirements 7 | RUN --mount=type=cache,target=/var/cache/apt,sharing=private \ 8 | --mount=type=cache,target=/var/lib/apt,sharing=private \ 9 | apt-get update \ 10 | && apt-get install -y --no-install-recommends \ 11 | git \ 12 | curl \ 13 | ca-certificates \ 14 | build-essential \ 15 | ninja-build \ 16 | gettext \ 17 | libtool \ 18 | libtool-bin \ 19 | autoconf \ 20 | automake \ 21 | cmake \ 22 | g++ \ 23 | pkg-config \ 24 | unzip 25 | 26 | ARG NEOVIM_VERSION=v0.11.3 27 | RUN git clone https://github.com/neovim/neovim \ 28 | && cd neovim \ 29 | && git switch --detach ${NEOVIM_VERSION} \ 30 | && make CMAKE_BUILD_TYPE=Release \ 31 | && make CMAKE_INSTALL_PREFIX=/opt/neovim install 32 | 33 | 34 | #------------------------------------------------------------------------------------------------------------ 35 | FROM debian:bookworm-backports as deno 36 | ENV DEBIAN_FRONTEND=noninteractive 37 | 38 | # Install requirements 39 | RUN --mount=type=cache,target=/var/cache/apt,sharing=private \ 40 | --mount=type=cache,target=/var/lib/apt,sharing=private \ 41 | apt-get update \ 42 | && apt-get install -y --no-install-recommends \ 43 | curl \ 44 | ca-certificates \ 45 | unzip \ 46 | git 47 | 48 | ARG DENO_VERSION=v2.3.0 49 | RUN curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/opt/deno sh -s ${DENO_VERSION} 50 | 51 | 52 | #------------------------------------------------------------------------------------------------------------ 53 | FROM debian:bookworm-backports as denops 54 | ENV DEBIAN_FRONTEND=noninteractive 55 | 56 | # Install requirements 57 | RUN --mount=type=cache,target=/var/cache/apt,sharing=private \ 58 | --mount=type=cache,target=/var/lib/apt,sharing=private \ 59 | apt-get update \ 60 | && apt-get install -y --no-install-recommends \ 61 | ca-certificates \ 62 | git 63 | 64 | # Install denops.vim 65 | ARG DENOPS_VERSION=main 66 | RUN mkdir -p denops.vim \ 67 | && cd denops.vim \ 68 | && git init \ 69 | && git remote add origin https://github.com/vim-denops/denops.vim.git \ 70 | && git fetch origin ${DENOPS_VERSION} \ 71 | && git reset --hard FETCH_HEAD 72 | 73 | 74 | #------------------------------------------------------------------------------------------------------------ 75 | FROM debian:bookworm-slim as runtime 76 | ENV DEBIAN_FRONTEND=noninteractive 77 | 78 | LABEL org.opencontainers.image.url https://github.com/orgs/vim-denops/packages/container/package/neovim 79 | LABEL org.opencontainers.image.source https://github.com/vim-denops/denops-dockerfile 80 | 81 | # Prefer to use Debian Backports 82 | # https://backports.debian.org/ 83 | RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/backports.list 84 | 85 | # Runtime environment 86 | ENV LC_ALL=C.UTF-8 \ 87 | PATH=/opt/vim/usr/local/bin:/opt/deno/bin:${PATH} 88 | 89 | COPY --from=neovim /opt/neovim /opt/neovim 90 | COPY --from=deno /opt/deno /opt/deno 91 | COPY --from=denops /denops.vim /root/.local/share/nvim/site/pack/denops/start/denops.vim 92 | 93 | # Install denops.vim 94 | WORKDIR /root/.local/share/nvim/site/pack/denops/start/denops.vim 95 | RUN deno cache denops/**/*.ts 96 | 97 | # Create helptags 98 | RUN /opt/neovim/bin/nvim --headless -n -V1 -c "helptags ALL" -c q 99 | 100 | # Setup user custom pack environment 101 | RUN mkdir -p /root/.local/share/nvim/site/pack/user/start 102 | WORKDIR /root/.local/share/nvim/site/pack/user/start 103 | 104 | ENTRYPOINT ["/opt/neovim/bin/nvim"] 105 | --------------------------------------------------------------------------------