mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
35 lines
786 B
TOML
35 lines
786 B
TOML
[metadata]
|
|
name = "docker-images"
|
|
description = "A channel to select from Docker images"
|
|
requirements = ["docker", "jq"]
|
|
|
|
[source]
|
|
command = "docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}'"
|
|
output = "{split: :-1}"
|
|
|
|
[preview]
|
|
command = "docker image inspect '{split: :-1}' | jq -C"
|
|
|
|
[ui]
|
|
layout = "portrait"
|
|
|
|
[keybindings]
|
|
ctrl-r = "actions:run"
|
|
ctrl-d = "actions:remove"
|
|
ctrl-s = "actions:shell"
|
|
|
|
[actions.run]
|
|
description = "Run a container from the selected image"
|
|
command = "docker run -it '{split: :-1}'"
|
|
mode = "execute"
|
|
|
|
[actions.shell]
|
|
description = "Run a shell in the selected image"
|
|
command = "docker run -it '{split: :-1}' /bin/sh"
|
|
mode = "execute"
|
|
|
|
[actions.remove]
|
|
description = "Remove the selected image"
|
|
command = "docker rmi '{split: :-1}'"
|
|
mode = "execute"
|