Git Product home page Git Product logo

dock-vim's Introduction

Dock vim

This repo contains docker images for different versions of Vim and its forks.

Why?

Following a minor backlash with a PR to a plugin that was supposed to work, I realized I needed better testing techniques. Installing several versions of Vim on the same system is not an option, because it gets messy fast.

The idea is to make it easier to test plugins on other versions of Vim without installing several or other versions to test it on one system.

Building

These images need to be manually built. I might make a shell script for it at some point, but it doesn't exist yet. I might also post it to Docker Hub at some point, but it's not necessary for my use.

Each Vim type has a base dockerfile. I'll get back to the details behind it on a per-type basis. This file contains the boilerplate code required to build. In addition, there's usually an associated .sh file, again, containing boilerplate for the build process itself. Each secondary docker file is in charge of dealing with the actual checkout and building. In most cases, the build itself means executing a standard .sh file containing the build. This is to keep repetitions in the code to a minimum.

A second advantage with using a master container containing all the dependencies and the vim distribution itself is that when the dependencies have been installed and vim has been cloned, it doesn't need to be again. It's all ready for whatever implementation is used.

Anyway, this is boring. The details:

Building Vim

Vim uses the dock-vim-base.dockerfile. This has to be built first, regardless of which version of Vim you want to install:

docker build -t dock-vim-base -f dock-vim-base.dockerfile .

That needs to process for a while, but it'll install all major dependencies. It also compiles Vim with Python 3.

After this, you need to build a version image. If you want Vim 8.1, you'll need:

docker build -t vim-8.1 -f vim/vim-8.1.dockerfile

This will check out the relevant tag, and build Vim. Like I mentioned earlier, holding the code in a master container lets Docker cache it and save time by not needing to re-clone it. The thing that actually takes time is therefore building it.

Neovim

Neovim is also included, and uses dock-neovim-base.dockerfile. As with Vim, this has to be built first, regardless of which Neovim version you want to install. (Note: only "latest" is currently supported).

docker build -t dock-neovim-base -f dock-neovim-base.dockerfile

This needs to process for a little while, to install the dependencies needed to build neovim, and to clone neovim itself.

After this, neovim itself needs to be built into an image. For the latest version, use:

docker build -t neovim-latest -f neovim/neovim-latest.dockerfile

And it'll build a container containing the latest version of Neovim

Using it

When it's installed, pretty much all you need to do is docker run and docker execute. After that, you get access to whichever version of Vim you picked.

Here's an example using Vim 8.1:

# Run it. This is also where you can link in folders.
# Use -v for folder linking. See https://stackoverflow.com/a/23455537/6296561
# Note that Windows with VirtualBox requires some additional config.
# I'm not covering that here.
docker run --name vim-8.1 -di vim-8.1
# This command gives you access to the container terminal:
docker exec -ti vim-8.1

License

This project is licensed under the Unlicense, because container images don't, in my opinion, need much more of a license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.