Created
March 11, 2018 16:38
-
-
Save IngoMeyer441/23f8585633defa4742cd2657d2d9cc7f to your computer and use it in GitHub Desktop.
Dockerfile for vim-vebugger testing with LLDB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:unstable | |
LABEL maintainer="Ingo Heimbach <[email protected]>" | |
RUN apt-get update && \ | |
apt-get install --no-install-recommends -y automake \ | |
build-essential \ | |
ca-certificates \ | |
cmake \ | |
curl \ | |
git \ | |
libtool-bin \ | |
lldb-3.9 \ | |
pkg-config \ | |
python-lldb-3.9 \ | |
unzip && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
update-alternatives --install "/usr/bin/lldb" "lldb" "/usr/bin/lldb-3.9" 1 && \ | |
sed -i '33c_swig_python_version_info = (0, 0, 0)' /usr/lib/python2.7/dist-packages/lldb/__init__.py | |
WORKDIR /tmp | |
RUN git clone https://github.com/neovim/neovim.git && \ | |
cd neovim && \ | |
make CMAKE_BUILD_TYPE=Release && \ | |
make install && \ | |
cd .. && \ | |
rm -rf neovim | |
RUN curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh && \ | |
bash installer.sh ~/.vim/dein && \ | |
rm -f installer.sh | |
RUN mkdir -p "${HOME}/.config/nvim" && \ | |
echo 'set runtimepath^=~/.vim runtimepath+=~/.vim/after\n\ | |
let &packpath = &runtimepath\n\ | |
source ~/.vimrc' \ | |
> "${HOME}/.config/nvim/init.vim" && \ | |
echo "set nocompatible\n\ | |
\n\ | |
set runtimepath+=/root/.vim/dein/repos/github.com/Shougo/dein.vim\n\ | |
if dein#load_state('/root/.vim/dein')\n\ | |
call dein#begin('/root/.vim/dein')\n\ | |
call dein#add('Shougo/dein.vim')\n\ | |
call dein#add('Shougo/vimproc.vim', {\n\ | |
\\ 'build': 'make',\n\ | |
\\ })\n\ | |
call dein#add('idanarye/vim-vebugger', {\n\ | |
\\ 'rev': 'develop',\n\ | |
\\ })\n\ | |
call dein#end()\n\ | |
call dein#save_state()\n\ | |
endif\n\ | |
\n\ | |
filetype plugin indent on\n\ | |
syntax enable\n\ | |
set background=dark\n\ | |
\n\ | |
let g:vebugger_leader = '<leader>v'" > /root/.vimrc | |
RUN echo ":call dein#install()\n" > ./vim_install_plugins && \ | |
echo '#!/bin/bash\nmake\nnvim -s /tmp/vim_install_plugins\nexec "$@"' > /tmp/entrypoint.sh && \ | |
chmod +x /tmp/entrypoint.sh | |
WORKDIR /root | |
RUN echo "#include<stdlib.h>\n#include<stdio.h>\n\ | |
\n\ | |
int main(void) {\n\ | |
int *ptr = NULL;\n\ | |
printf(\"ptr conent: %d\", *ptr);\n\ | |
return 0;\n\ | |
}" > test.c && \ | |
echo "test: test.c\n\ | |
\t\$(CC) -o \$@ -g \$<" > Makefile | |
ENTRYPOINT ["/tmp/entrypoint.sh"] | |
CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some notes:
--privileged
flag for lldb to work.vim-vebugger
automatically. When finished, neovim should be reopened.~
. Startvim-vebugger
with: