File: Dockerfile

package info (click to toggle)
vim-link-vim 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524 kB
  • sloc: python: 66; makefile: 30
file content (42 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download
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
# Run tests in a Docker container to avoid any interference from existing
# settings and plugins.

# hadolint global ignore=DL3001,DL3008,DL3059

# This points to the current Ubuntu LTS release.
ARG BASE_IMAGE=ubuntu:latest
FROM ${BASE_IMAGE}

ARG DEBIAN_FRONTEND=noninteractive

# Install packages.
RUN apt-get update && \
  apt-get install --yes --no-install-recommends git pipx vim neovim make && \
  rm -rf /var/lib/apt/lists/*

# Ensure that `vim` doesn't point to `nvim` on Ubuntu.
RUN update-alternatives --set vim /usr/bin/vim.basic

RUN useradd --create-home vimmer
USER vimmer
WORKDIR /home/vimmer
RUN echo "set -o vi" >> /home/vimmer/.bashrc

# Install the Vint linter.
# hadolint ignore=DL3013
RUN pipx install git+https://github.com/Vimjas/vint.git
ENV PATH="/home/vimmer/.local/bin:${PATH}"

# Install the Vader test plugin.
RUN git clone https://github.com/junegunn/vader.vim vader.vim

# Copy the Vim and Neovim configuration files.
COPY --chown=vimmer:vimmer test/minimal.vimrc .vimrc
COPY --chown=vimmer:vimmer test/minimal.vimrc .config/nvim/init.vim

# Copy the link.vim plugin.
COPY --chown=vimmer:vimmer . link.vim

WORKDIR /home/vimmer/link.vim

CMD [ "bash" ]