2021-06-09 17:23:48 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2022-01-06 22:50:04 +00:00
|
|
|
set -e
|
2021-06-09 17:23:48 +00:00
|
|
|
|
|
|
|
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" \
|
2022-01-06 22:50:04 +00:00
|
|
|
--env "NVIM_COLOR=$NVIM_COLOR" \
|
2021-12-17 04:50:37 +00:00
|
|
|
--volume "${container_name}-home:/home/vividboarder/.data" \
|
2021-06-09 17:23:48 +00:00
|
|
|
--volume "$(pwd):/home/vividboarder/data" \
|
|
|
|
--workdir /home/vividboarder/data \
|
2021-12-17 04:50:37 +00:00
|
|
|
--entrypoint /docker-entry.sh \
|
2022-01-03 06:06:47 +00:00
|
|
|
--user "vividboarder:$(id -g)" \
|
|
|
|
--group-add users \
|
2022-01-06 22:50:04 +00:00
|
|
|
vividboarder/my-neovim "$@"
|