Home

Awesome

<p align="center"> <img src="https://github.com/pommee/Pocker/blob/main/resources/pocker-name.png?raw=true" /> <table> <tr> <td> <img width="100%" src="https://github.com/pommee/Pocker/blob/main/resources/home-preview.png?raw=true"> </td> <td> <img width="100%" src="https://github.com/pommee/Pocker/blob/main/resources/search-logs.png?raw=true"> </td> </tr> <tr> <td> <img width="100%" src="https://github.com/pommee/Pocker/blob/main/resources/shell-preview.png?raw=true"> </td> <td> <img width="100%" src="https://github.com/pommee/Pocker/blob/main/resources/help-screen-preview.png?raw=true"> </td> </tr> </table> </p>

👋🏼 Introduction

<img width="40%" align="right" src="https://github.com/pommee/Pocker/blob/main/resources/half-preview.png?raw=true">

Pocker is a TUI tool to help with docker related tasks. For example,

The tool is heavily based on docker-py and textual.
A big thanks goes over to the creator and contributors of textual as it makes for a very sleek and easy interface.

"Buy Me A Coffee"

Why?

I spend a lot of time working with Docker, and typing numerous commands can be time-consuming, energy-draining, and inefficient.
This is something that can, of course, be improved with the right tool.

The initial drive was to type less, but has since evolved into more.
Being able to search for a keyword and quickly get live feedback is very nice.
Need a new env variable? Just head over to the shell tab and run one command.

Prerequisite

[!NOTE] Pipx must be installed.
Python version 3.10.9 or newer.

📦 Installation

Pocker is hosted at PyPi (see here).

pipx install pocker-tui           # Latest version
pipx install pocker-tui==version  # Specific version

Install from GitHub repository

PyPi will mostly contain newest version, but it is also possible to run install from this repository.

pipx install git+https://github.com/pommee/Pocker

🚦 Usage

pocker          # Start pocker
pocker update   # Fetch and install latest version

Keybinds can be seen in the footer when started or by pressing ? to display help modal.

🔧 Configuration

Upon the first startup, a configuration file will be generated and stored at $HOME/.config/pocker/config.yaml.

KeyDefaultInfo
log_tail2000At startup, Pocker will fetch log_tail amount of container logs.<br> Not recommended to exceed ~3000 as startup will slow down.
max_log_lines2000The displayed container logs are shown sequentially, with the oldest log being removed as a new one appears.
show_all_containersfalseShow running and exited containers.
start_fullscreenfalseDisplay container logs in fullscreen mode at startup.
start_scrolltrueAutomatically scrolls when new logs are fetched.
start_wrapfalseWhen enabled, logs will wrap to fit the content window.

Keymap [default]

KeyActionDescription
qQuitExits the application.
lLogsOpens the logs view to display log entries.
/SearchSearch logs.
TABCycle widgetsUsed to cycle widgets. Newly focused widget will have it's borders alter colors.
aAttributesDisplays the attributes panel, showing various item attributes.
eEnvironmentOpens the environment settings view.
dStatisticsShows statistical information related to the container.
vShellCreates a shell for the current container.
fFullscreenToggles fullscreen mode for the logs view.
nFullscreen (Containers & Images)Toggles fullscreen mode for containers and images view.
wWrap LogsToggles log wrapping in the logs view.
sToggle ScrollToggles scrolling mode for the current view.

This table helps you understand the functionalities assigned to each key, making navigation and operation more efficient.

Errors

Errors will be displayed whenever encountered.
This can occur if an update is released with new keybinds required as an example.
The solution is to either add the new keybind manually or delete the config and restart pocker.
Default keymap can always be found here.

keybind-error

Example of faulty keybind for Shell; in this case the key does not exist in the config.