vim-settings/nvim-container.sh
ViViDboarder ed73884345 Update Dockerfile and related Docker scripts
Now working nvim in Docker!
2021-12-16 20:52:09 -08:00

24 lines
631 B
Bash
Executable File

#! /bin/bash
if ! docker image ls -q nvim > /dev/null ;then
echo "no nvim image found"
exit 1
fi
container_name=nvim-$USER
if ! docker inspect "${container_name}-home" > /dev/null ; then
docker volume create "${container_name}-home"
fi
docker run --interactive --rm --tty \
--name "$container_name" \
--env "VIM_COLOR=$VIM_COLOR" \
--volume "${container_name}-home:/home/vividboarder/.data" \
--volume "$(pwd):/home/vividboarder/data" \
--workdir /home/vividboarder/data \
--entrypoint /docker-entry.sh \
--user "$(id -u):$(id -g)" \
nvim "$@"
# vividboarder/my-neovim nvim "$@"