Source to build toolbox
container images containing all tools and config that I use on a daily basis.
this project currently has 2 images:
- base-toolbox toolbox (general purpose toolbox)
- vim-toolbox (uses base-toolbox as a base + neovim)
I work as a freelance Cloud Engineer / SRE and often need seperate environments for different customers. Sometimes I even need different environments for multiple teams at a single customer.
These toolboxes are based on Fedora as I run them on Fedora Silverblue. They are not tested on other distributions.
- To run the toolboxes you need at least
toolbox
installed (https://containertoolbx.org/). - If you need to build the toolbox images you also need
podman
(https://podman.io/ which is a dependency of toolbox)
- tmux
- asdf
- Plugins are managed by
Packer
which seems to be the go-to plugin manager for Neovim. - Language server (LSP) is handled by
neovim-lsp
. Telescope
takes care of fuzzy finding.
efm is a General Purpose Language server and is used to format/lint using the build in LSP. https://github.com/mattn/efm-langserver
go install github.com/mattn/efm-langserver@latest
I use the Nightfox theme.
From the root of this project run:
podman build -t toolbox/nvim nvim-toolbox/
Create a toolbox with the name mytoolbox
$ toolbox create -i toolbox/nvim mytoolbox
Created container: mytoolbox
Enter with: toolbox enter mytoolbox
Run the toolbox
toolbox enter mytoolbox
I always use tmux
for work in a terminal. Since it's part of the container
image you can run it from the toolbox. But you can also get a tmux
session in one go
toolbox run -c mytoolbox tmux
A lot of the tools that I use can be installed by downloading a binary, make it executable and add it to a location in $PATH. Example: Terraform, kubectl, golang, ...
Adding all these to the container image would cause it to become quite big
which is something I want to prevent. therefore the useful
asdf tool will be used. This tool will
install and manage the versions for the binaries we need, but will put them on
the host system (so not in the container - $ASDF_DATA_DIR
).
Best way to explain it is by showing some examples
asdf plugin add golang
asdf install golang 1.19.1
asdf global golang 1.19.1
asdf current golang
Check the asdf
documentation (run asdf without options to get options)
- https://github.com/containers/toolbox
- asdf-community/asdf-golang#28 (Golang and asdf)
The following packages are needed for NeoVim plugins (Treesitter)
dnf install gcc clang
Issue: When opening help in NeoVim you see the following error: cannot find -lstdc++: No such file or directory
Solution: install gcc clang lstdc++-static lstdc++
and run in vim :TSUpdate
NOTE: It is a good idea to run TSUpdate
after an update of TreeSitter