vim-settings/docker/nvim-container.sh
ViViDboarder cee4d47967 Update container script to override detach keys
This allows me to use ctrl-z to send nvim to the background
2024-11-17 21:48:43 -08:00

22 lines
584 B
Bash
Executable File

#! /bin/bash
set -e
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 \
--detach-keys "ctrl-z" \
--name "$container_name" \
--env "NVIM_COLOR=$NVIM_COLOR" \
--volume "${container_name}-home:/home/vividboarder/.data" \
--volume "$(pwd):/home/vividboarder/data" \
--workdir /home/vividboarder/data \
--entrypoint /docker-entry.sh \
--user "vividboarder:$(id -g)" \
--group-add users \
vividboarder/my-neovim "$@"