Skip to content

Instantly share code, notes, and snippets.

@tobihans
Forked from anonymous/Dockerfile
Created October 8, 2022 21:14
Show Gist options
  • Save tobihans/309b9385b08e5955b8fc3614f4822016 to your computer and use it in GitHub Desktop.
Save tobihans/309b9385b08e5955b8fc3614f4822016 to your computer and use it in GitHub Desktop.
FROM base/archlinux
ADD dotfiles/vimrc /root/.vimrc
ADD dotfiles/vim /root/.dotfiles/vim
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm \
neovim \
git \
python2-neovim \
python-neovim \
xclip \
xsel && \
pacman -Scc --noconfirm && \
mkdir -p /root/.config && \
ln -s /root/.dotfiles/vim /root/.vim && \
ln -s /root/.vim /root/.config/nvim && \
nvim --headless +PluginInstall +qa
CMD /usr/bin/env nvim
SUDO=sudo
DOTFILES=$(HOME)/.dotfiles
all: bindmounts build
bindmounts:
@mkdir -p dotfiles
@echo Bind mounting dotfiles
mount | grep -q "on $(PWD)/dotfiles" || sudo mount --bind "$(DOTFILES)" "$(PWD)/dotfiles"
build:
$(SUDO) -E docker build -t local/neovim .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment