Got tired of having to constantly manipulate the docker CLI commands for basic operations and for which the API has changed rapidly in the past year (much top-ranked info out there is out of date)
Assuming docker is installed (brew cask install dockertoolbox
):
- Start/stop/remove docker containers
- Easily copy container IP to pasteboard addresses by just clicking
- Conveniently open browser on container's exposed port
- Open Kitematic GUI app included with dockertoolbox by clicking
Docker
Get it here: docker.lua
Save as docker.lua
in ~/.hammerspoon/
and put docker = require "docker"
in your init.lua
I use lua-stdlib (installed with luarocks-5.3 install stdlib
) for the keys function but you can just as easily have your own:
local keys = function(t)
local keys={}
for k, v in pairs(t) do
table.insert(keys, k)
end
table.sort(keys)
return keys
end