Docker management right inside Neovim!
- Container management
- View containers on your local machine with live reloading
- Bring containers up/down
- Remove and rebuild containers
- Send commands to containers (SoonTM)
- View container logs
- Configurable (SoonTM)
- Docker compose integration (SoonTM)
- Image management
- View images on you local machine with live reloading (SoonTM)
- Create new containers from images (SoonTM)
use {
'dgrbrady/nvim-docker',
requires = {'nvim-lua/plenary.nvim', 'MunifTanjim/nui.nvim'},
rocks = '4O4/reactivex' -- ReactiveX Lua implementation
}
In your lua config:
local nvim_docker = require('nvim-docker')
-- list containers
nvim_docker.containers.list_containers()
-- OR
-- setting up keybindings since the `list_containers` fn does not have a default binding
vim.keymap.set('n', '<leader>C', nvim_docker.containers.list_containers)
Binding | Where | Effect |
---|---|---|
j |
Top popup | Move cursor down on container list |
k |
Top popup | Move cursor up on container list |
l |
Top popup | Expand container details |
L |
Top popup | Expand all containers |
h |
Top popup | Collapse container details |
H |
Top popup | Collapse all containers |
r |
Top popup | Restart container |
dd |
Top popup | Deletes container (asks for confirmation) |
t |
Top popup | View container logs |
<Tab> |
Top popup | Focus bottom popup |
t |
Bottom popup | Toggles whether the cursor should be stuck to the bottom of the popup. Helpful if you want to watch the latest logs as they come in |
<S-Tab> |
Bottom popup | Focus top popup |
- Interact with containers
- Interact with images
- List image
- Delete image
- Create container from image
- Docker compose integration
- Provide options for user configuration
- Documentation
- Telescope integration?
- clone the project
git clone https://github.com/dgrbrady/nvim-docker
- go to the project folder
cd nvim-docker
- start editing
nvim --cmd "set rtp+=."
- reference the dev configurations
:luafile dev/init.lua
- run the
containers.list_containers()
function using,w
keybind