A simple tui to view & control docker containers

Related tags

Command-line oxker
Overview

oxker

A simple tui to view & control docker containers

Built in Rust, making heavy use of tui-rs & Bollard

Download & install

See releases

download & install (x86_64 one liner)

wget https://www.github.com/mrjackwills/oxker/releases/latest/download/oxker_linux_x86_64.tar.gz &&
tar xzvf oxker_linux_x86_64.tar.gz oxker &&
install -Dm 755 oxker -t "${HOME}/.local/bin" &&
rm oxker_linux_x86_64.tar.gz oxker

Run

oxker

available command line arguments

argument result
-d [number > 0] set the update interval for docker information, in ms, defaults to 1000 (1 second)
-r Show raw logs, by default oxker will remove ANSI formatting (conflicts with -c)
-c Attempt to color the logs (conflicts with -r)
-t Remove timestamps from each log entry
-g No tui, basically a pointless debugging mode, for now

Build step

x86_64

cargo build --release

Raspberry pi

requires docker & cross-rs

64bit pi (pi 4, pi zero w 2)

cross build --target aarch64-unknown-linux-gnu --release

32bit pi (pi zero w)

Tested, and fully working on pi zero w, running Raspberry Pi OS 32 bit, the initial logs parsing can take an extended period of time if thousands of lines long, suggest running with a -d argument of 5000

cross build --target arm-unknown-linux-musleabihf --release

If no memory information available, try appending /boot/cmdline.txt with

cgroup_enable=cpuset cgroup_enable=memory

see https://forums.raspberrypi.com/viewtopic.php?t=203128 and docker/for-linux#1112

Untested on other platforms

Tests

As of yet untested, needs work

cargo test -- --test-threads=1

Run some example docker images

using docker-compose.yml;

docker compose -f docker-compose.yml up -d

or individually

docker run --name redis -d redis:alpine3.16

docker run --name postgres -e POSTGRES_PASSWORD=never_use_this_password_in_production -d postgres:alpine

docker run -d --hostname my-rabbit --name rabbitmq rabbitmq:3

Comments
  • [NEW FEATURE] Publish as Docker image

    [NEW FEATURE] Publish as Docker image

    Is your feature request related to a problem? Please describe.

    Would be great to have this tool published as a Docker image on the main Docker registry, and maybe ghcr.io and quay.io as well. This would allow running it anywhere where Docker is installed, without having to install any additional machinery.

    Describe the solution you'd like

    Having automated builds and publishing to popular Docker image registries.

    Describe alternatives you've considered

    None really 🤷

    Additional context

    Currently using another popular Docker container dashboard called ctop, and find oxker much nicer actually. Just would love to have it available as image so I could run it as follows:

    docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock:ro ghcr.io/mrjackwills/oxker:latest
    
    opened by dnaka91 6
  • [BUG] Malformed escape codes in docker logs causes panic

    [BUG] Malformed escape codes in docker logs causes panic

    Describe the bug Malformed color codes in docker log output cause panic (regardless of -c)

    To Reproduce

    1. Use software in a docker container which spews out partial ANSI escape codes, for example ESC[\n
    2. Oxker panics here when trying to parse the log (inside cansi::v3::categorise_text)

    Here is a minimal demo of such a panic:

    use cansi::v3::categorise_text;
    
    fn main() {
        let x = categorise_text("oops\x1b[\n");
        println!("{}", x[0].text);
    }
    

    Expected behavior Oxker is robust to garbage in log output

    Desktop (please complete the following information):

    • OS: Linux

    I understand this may be considered an upstream issue of the cansi crate; I've opened an issue there as well: https://github.com/kurtlawrence/cansi/issues/7

    bug 
    opened by gandalf3 5
  • docs: add nix instructions

    docs: add nix instructions

    Oxker has been merged into nixpkgs. This commit adds instructions for using oxker with nix. This also reworks the 'Run & Install' section to be more cohesive.

    opened by siph 4
  • Track `Cargo.lock`

    Track `Cargo.lock`

    I opened a pull request to package oxker for nix package manager. Nix is highly focused on reproducibility and as a result requires the Cargo.lock file to pin specific dependency versions, otherwise it is impossible to build a cargo project for nixpkgs. As a result I've had to generate the Cargo.lock into a patch file to apply before building. This isn't ideal and makes maintaining more difficult as I will have to generate this file for every update.

    Tracking the Cargo.lock file also make sense outside of the nix ecosystem and is considered best practice for binary applications as stated in the cargo book.

    opened by siph 3
  • fix(draw_blocks): correct pane-navigation tooltip

    fix(draw_blocks): correct pane-navigation tooltip

    Help tooltip is incorrectly labeled as 'alt+tab' for backwards pane navigation. It should be labeled as 'shift+tab' as per the functionality of Backtab from the crossterm crate.

    opened by siph 1
  • [BUG] Multi-line coloured log incorrectly coloured

    [BUG] Multi-line coloured log incorrectly coloured

    Describe the bug When executed using the -c flag, multi-line coloured log entries only the first line of said entry has a colour applied to it

    Expected behavior All lines should correctly be colourised

    bug 
    opened by mrjackwills 1
  • [BUG] disable oxker commands

    [BUG] disable oxker commands

    Describe the bug When running via docker, if restart, pause, or exit, the oxker container, can cause havoc with the terminal output

    Expected behavior Shouldn't be allowed to send commands to the oxker container

    bug 
    opened by mrjackwills 0
  • [NEW FEATURE] Sort columns reset

    [NEW FEATURE] Sort columns reset

    Is your feature request related to a problem? Please describe. Clicking a column will sort Ascending & Descending, but cannot reset the sort

    Describe the solution you'd like First click sorts ascending, second click sorts descending, third click removes all the sorts

    opened by mrjackwills 0
  • [NEW FEATURE] put container name next to Logs title

    [NEW FEATURE] put container name next to Logs title

    Describe the solution you'd like Instead of "Logs 120/300", show "Logs 120/300 - my_container_name"

    Additional context Uses up more screen space, although currently is a border so shouldn't matter. Would need to make sure that container name isn't too long, maybe just accept first 32 chars of container name?

    opened by mrjackwills 0
  • [BUG] Heading bar loading icon color & position

    [BUG] Heading bar loading icon color & position

    Describe the bug The loading icon in the heading bar is black on purple, and can be hard to read. Loading icon shifting heading titles, shouldn't effect the heading positions

    To Reproduce Restart any container to see loading icon, and they headings shift

    Expected behavior Icon should be more visible and obvious, and shouldn't shift the heading titles

    Additional context Change the span to white

    bug 
    opened by mrjackwills 0
  • [BUG] unwrap err on rebuild

    [BUG] unwrap err on rebuild

    Describe the bug If oxker is running, and one rebuilds containers, oxker will error out with a unwrap error, related to app_data mod.rs 308:39

    To Reproduce Steps to reproduce the behavior:

    1. Run oxker in one terminal window
    2. Rebuild running containers in another window, with docker compose pull && docker compose up -d
    3. See error :(

    Expected behavior Oxker should be able to handle rebuilt containers, should be removed from memory, and then re-added once rebuild is complete

    bug 
    opened by mrjackwills 0
  • [BUG] Duplicate log entries

    [BUG] Duplicate log entries

    Describe the bug Have, on occasion, seen duplicate log entries in the log panel

    To Reproduce So far difficult to replicate

    Expected behavior Should only display each log entry once

    Fixes Should always record timestamp with each log entry, maybe in a tuple (timestamp, log_entry), and then only insert into the log Vec (or ideally a HashSet), if the (timestamp, log_entry) is unique. Would need to change the way the -t arg is interpreted in order to display, or not display, the timestamp

    bug 
    opened by mrjackwills 0
  • [NEW FEATURE] restart should use a different colour

    [NEW FEATURE] restart should use a different colour

    Is your feature request related to a problem? Please describe. When restarting a container, the columns are still coloured as green

    Describe the solution you'd like A container in a restarting state should use a none green (as current), nor red/yellow color

    opened by mrjackwills 7
  • [NEW FEATURE] export logs

    [NEW FEATURE] export logs

    Is your feature request related to a problem? Please describe. Enable to export of logs to a .log(?) file

    Describe the solution you'd like On a key press - "e"? - export the selected containers logs to a file, made sure to strip of all ANSI formatting Saved to a known location - home folder? - or allow user to choose

    opened by mrjackwills 0
Releases(v0.1.10)
Owner
Jack Wills
Jack Wills
A template for bootstrapping a Rust TUI application with tui-rs & crossterm

rust-tui-template A template for bootstrapping a Rust TUI application with tui-rs & crossterm. tui-rs The library is based on the principle of immedia

Orhun Parmaksız 72 Dec 31, 2022
A simple, opinionated way to run containers for tests in your Rust project.

rustainers rustainers is a simple, opinionated way to run containers for tests. TLDR More information about this crate can be found in the crate docum

wefox 4 Nov 23, 2023
A small command-line application to view images from the terminal written in Rust.

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer

Atanas Yankov 1.9k Jan 3, 2023
❗️ Small script to view GitHub notifications in the terminal

github-notifications Small script to view GitHub notifications in the terminal Shows and color-codes the notification source, eg if you're the owner o

Brian Shaginaw 1 Jan 10, 2022
A discord bot to view & monitor OpenSea collections, written in Rust

Titan What is this This is a discord bot to monitor OpenSea collections and get info about them, including: Floor Price Activity Sales per Hour And mo

theldb 3 Oct 11, 2022
View your github contribution calander in unicode.

View your github contribution calander in the terminal Now in rust! gh-cal 0.1.0 marshmallow View your github contribution calander in unicode USAGE:

marshmallow 54 Sep 12, 2022
A git sub-command to view your git repository in the web browser

git-view A git sub-command to view your git repository in the web browser! About Are you also frustrated from moving your hands away from the keyboard

Hamothy 5 Sep 26, 2022
Introducing Inlyne, a GPU powered yet browsless tool to help you quickly view markdown files in the blink of an eye.

Inlyne - a GPU powered, browserless, markdown + html viewer inlyne README.md --theme dark/light About Markdown files are a wonderful tool to get forma

null 308 Jan 1, 2023
A formatter for the leptos view! macro

leptosfmt A formatter for the leptos view! macro All notable changes are documented in: CHANGELOG.md Install cargo install leptosfmt or for trying out

Bram 13 Apr 4, 2023
View Source, but for terminal escape sequences

Escape Artist Escape Artist is a tool for seeing ANSI escape codes in terminal applications. You interact with your shell just like you normally would

Reilly Wood 8 Apr 16, 2023
A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.

Terminal Media Player View images, videos (files or YouTube links), webcam, etc directly in the terminal as ASCII. All images you see below are just m

Max Curzi 36 May 8, 2023
A filesystem driver that allows you to view your Blackboard course contents as if they were normal files and folders on your system!

BlackboardFS Blackboard: noun A website so bad that it might as well be a network drive. BlackboardFS is a filesystem driver that allows you to view y

null 22 Sep 4, 2023
A rust crate to view a structure as raw bytes (&[u8])

rawbytes A Rust crate to view a structure as a plain byte array (&[u8]). Super simple. Tiny. Zero dependencies. This is a safer interface to slice::fr

Frank Denis 4 Sep 7, 2023
The first web framework in Rust to adopt the Model-View-Controller (MVC) architecture

Integra Web Framework Integra is a sleek, performant web framework for Rust, harnessing the power of the hyper library. Will become the first highly p

null 3 Sep 11, 2023
Utility to display a tree view of directories.

TreeCraft v0.2.3 (16 October 2023) TreeCraft is a command-line utility written in pure Rust that helps you visualize directory structures in ASCII for

Akmal 4 Oct 14, 2023
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

null 4 Dec 11, 2023
A simple program that provides DBus interface to control display temperature and brightness under wayland without flickering

wl-gammarelay-rs Like wl-gammarelay, but written in rust, runs on a single thread, has three times less SLOC and uses DBus (for simplicity). Dbus inte

Max Verevkin 33 Nov 23, 2022
A simple interactive OSC (Open Sound Control) debugger for terminal

oscd, a simple interactive OSC debugger for the terminal by using nom as a lexer/parser, oscd offers auto type casting and support sending multiple osc arguments.

Karnpapon Boonput 5 Oct 19, 2022
Simple TUI frontend for paru,

parui Simple TUI frontend for paru. Images Keybinds parui adopts vim-like keybinds. Key Mode Action <Escape> Insert Enter Select Mode <Return> Insert

Qther 25 Jan 3, 2023