Home

Awesome

docker.vim Powered by vital.vim

docker.vim is stopped development, please use denops-docker.vim.

This is management plugin for docker.

If you want to manage docker-compose, you can use docker-compose.vim.

Features

images

containers

networks

others

Requirements

Installation

e.g using dein.vim

[[plugins]]
repo = 'skanehira/docker.vim'

e.g using docker

$ docker run --rm -itv /var/run/docker.sock:/var/run/docker.sock skanehira/docker.vim

Usage

settings

" open browser command, deafult is 'open'
let g:docker_open_browser_cmd = 'open'

" split temrinal windows, can use vert or tab, etc...
" see :h vert
let g:docker_terminal_open = 'bo'

" check plugin's version when plugin loading.
" default is checking.
" If you not want to check, please set 0 to this option.
let g:docker_plugin_version_check = 1

" Set value to 1 can enable using tmux to attach container.
" default value: 0
let g:docker_use_tmux = 1

" this is registry auth info.
" if you want to push an image, please set your auth info.
let g:docker_registry_auth = {
	\ 'username': 'your name',
	\ 'password': 'your password',
	\ 'email': 'your email',
	\ 'serveraddress': 'https://docker.io/',
	\ }

" you can also read auth info from json file.
" if you manage vimrc on GitHub, we recommend using json file.
let s:docker_auth_file = expand('~/.docker/docker.vim.json')
let g:docker_registry_auth = \
	json_decode(join(readfile(s:docker_auth_file), "\n"))

commands

docker wrap command

" result will display in terminal buffer.
:Docker ps -a

images

:DockerImages

pull image

:DockerImagePull

conatiners

:DockerContainers

monitor container

" start monitor
:DockerMonitorStart {id or name}

" stop monitor
:DockerMonitorStop

monitor window move

:DockerMonitorWindowMove

monitoring container logs

" if contaienr is not running, terminal does not close automatically
:DockerContainerLogs {id or name}

monitoring docker engine's events

:DockerEvents

build an image

" build an image use Dockerfile
:DockerImageBuild -t {tag_name} .

" build an image use buffer's contents
:'<,'>DockerImageBuild -t {tag_name} -

show version info

:DockerVersion

key bindings

common operations in popup window.

keyoperation
gscroll to top
Gscroll to bottom
qclose popup window
ctrl-^switch to other popup window

containers

keyoperation
ustart container
sstop container
rrestart container
Rrefresh containers
Kkill container
aattach container
mmonitor container's cpu nad mem usage
ctrl-ddelete container
ctrl-rrename container
lmonitoring container logs
/start filter mode
pswitch to images popup window
ccopy file/folters between containers and local file system
Ccreate a new image from container
<CR> (same as Enter)inspect a container

images

keyoperation
Rrefresh images
rrun container
ctrl-ddelete image
ctrl-rquick run container(like docker run -it)
/start filter mode
ttag an image
ssave an image to tarball
lload an image from tarball
<CR> (same as Enter)inspect an image

networks

keyoperation
<CR> (same as Enter)inspect a network

search images

keyoperation
ppull image
oopen DockerHub in browser