Add NeoVim to Running Pod/Container


Recently, I had an issue where I was trying to investigate an issue on a running Kubernetes (K8s) pod. It was a pain because I didn’t have root to install additional tools, but I did have curl.

I came up with a quick way to add NeoVim with curl.

curl -LO
chmod +x nvim.appimage
./nvim.appimage --appimage-extract
export PATH=$(pwd)/squashfs-root/usr/bin:$PATH
alias vi=nvim
alias vim=nvim

After that you can use NoeVim anywhere you’d like.



Bonus points, this container also didn’t have find. I turned to fd instead.

curl -LO
mkdir fd
tar zxvf fd-v9.0.0-x86_64-unknown-linux-gnu.tar.gz --strip-components 1 -C fd
export PATH=$(pwd)/fd:$PATH


Bonus points, this container had grep, but grep is slow. I turned to ripgrep.

curl -LO
mkdir rg
tar zxvf ripgrep-14.0.3-x86_64-unknown-linux-musl.tar.gz --strip-components 1 -C rg
export PATH=$(pwd)/rg:$PATH


curl -LO
mkdir doggo
tar zxvf doggo_0.5.7_linux_amd64.tar.gz -C doggo
export PATH=$(pwd)/doggo:$PATH

If you need other runtimes for these programs, check out their project release pages:

Loading Comments...