mirror of
https://github.com/prdlk/television.git
synced 2026-11-02 13:12:51 +00:00
Import from root chezmoi source
This commit is contained in:
commit
c8c8c9a000
77 files changed
+2443
No files matched your search
@@ -0,0 +1,56 @@
|
||||
[metadata]
|
||||
name = "docker-containers"
|
||||
description = "List and manage Docker containers"
|
||||
requirements = ["docker", "jq"]
|
||||
|
||||
[source]
|
||||
command = [
|
||||
{ name = "Running", run = "docker ps --format '{{.Names}}\\t{{.Image}}\\t{{.Status}}'" },
|
||||
{ name = "All", run = "docker ps -a --format '{{.Names}}\\t{{.Image}}\\t{{.Status}}'" },
|
||||
]
|
||||
display = "{split:\\t:0} ({split:\\t:2})"
|
||||
output = "{split:\\t:0}"
|
||||
|
||||
[preview]
|
||||
command = "docker inspect '{split:\\t:0}' | jq -C '.[0] | {Name, State, Config: {Image: .Config.Image, Cmd: .Config.Cmd}, NetworkSettings: {IPAddress: .NetworkSettings.IPAddress}}'"
|
||||
|
||||
[ui]
|
||||
layout = "portrait"
|
||||
|
||||
[keybindings]
|
||||
ctrl-s = "actions:start"
|
||||
f2 = "actions:stop"
|
||||
ctrl-r = "actions:restart"
|
||||
ctrl-l = "actions:logs"
|
||||
ctrl-e = "actions:exec"
|
||||
ctrl-d = "actions:remove"
|
||||
|
||||
[actions.start]
|
||||
description = "Start the selected container"
|
||||
command = "docker start '{split:\\t:0}'"
|
||||
mode = "fork"
|
||||
|
||||
[actions.stop]
|
||||
description = "Stop the selected container"
|
||||
command = "docker stop '{split:\\t:0}'"
|
||||
mode = "fork"
|
||||
|
||||
[actions.restart]
|
||||
description = "Restart the selected container"
|
||||
command = "docker restart '{split:\\t:0}'"
|
||||
mode = "fork"
|
||||
|
||||
[actions.logs]
|
||||
description = "Follow logs of the selected container"
|
||||
command = "docker logs -f '{split:\\t:0}'"
|
||||
mode = "execute"
|
||||
|
||||
[actions.exec]
|
||||
description = "Execute shell in the selected container"
|
||||
command = "docker exec -it '{split:\\t:0}' /bin/sh"
|
||||
mode = "execute"
|
||||
|
||||
[actions.remove]
|
||||
description = "Remove the selected container"
|
||||
command = "docker rm '{split:\\t:0}'"
|
||||
mode = "execute"
|
||||
Reference in new issue
Block a user