Skip to content

Instantly share code, notes, and snippets.

@vsoch
Last active May 15, 2019 07:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsoch/a537a01c318b6b6978574227c1b1a2f5 to your computer and use it in GitHub Desktop.
Save vsoch/a537a01c318b6b6978574227c1b1a2f5 to your computer and use it in GitHub Desktop.
An example multistage Dockerfile to install gvim and then throw the extra stuff away!
FROM ubuntu:18.04 as base
# docker build -t vanessa/vim .
RUN apt-get update && apt-get install -y git \
gcc \
libncurses5-dev \
libncursesw5-dev \
build-essential
RUN git clone https://github.com/vim/vim.git && \
cd vim && \
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/lib64/python2.7/config \
--enable-python3interp=yes \
--with-python3-config-dir=/opt/rh/rh-python36/root/lib64/python3.6/config-3.6m-x86_64-linux-gnu \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/opt/vim_8.1 && \
make VIMRUNTIMEDIR=/opt/vim_8.1/share/vim/vim81 && \
make install
FROM ubuntu:18.04
RUN mkdir -p /usr/local/vim/bin
COPY --from=base /opt/vim_8.1/bin /usr/local/vim/bin
ENV PATH=/usr/local/gvim/bin:$PATH
ENTRYPOINT ["/usr/local/vim/bin/vim"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment